-
m-relay
<rucknium:monero.social> Very rough web app visualizing live orphaned blocks/chains and who mined them:
moneroconsensus.info
-
m-relay
<rucknium:monero.social> Source code:
github.com/Rucknium/xmrconsensus
-
m-relay
<rucknium:monero.social> Special thanks to DataHoarder for pool data:
git.gammaspectra.live/WeebDataHoarder/monero-blocks (website out of service at the moment?)
-
DataHoarder
btw c3pool doesn't return data on api sometimes
-
DataHoarder
but it backfills 9999 blocks when it does
-
m-relay
<rucknium:monero.social> If Qubic attempts selfish mining and/or deep chain re-orgs, the webapp should show it.
-
m-relay
<rucknium:monero.social> I think. It's untested.
-
DataHoarder
if you are running it regularly, it'll show up at some point
-
m-relay
<rucknium:monero.social> Great. Even if I specify a low `--height`?
-
DataHoarder
yeah, it just returns nothing
-
DataHoarder
also - as indicated, if there's previous data in csv for that given pool
-
DataHoarder
that value will be used as "lowest" height
-
m-relay
<rucknium:monero.social> I mean, a high height
-
DataHoarder
I'd recommend you just keep a running csv file
-
DataHoarder
yeah, it doesn't matter, even first query fails on c3pool
-
DataHoarder
so old data is kept until the refetch occurs
-
m-relay
<rucknium:monero.social> I have it on a 60-second refresh loop, going back 720 blocks each time just to be sure.
-
DataHoarder
-
m-relay
<rucknium:monero.social> Looks like we just had our first live orphaning!
-
m-relay
<rucknium:monero.social> Unless the app is broken, which it could be.
-
DataHoarder
also - many pools don't report orphans. so you probably need to track the old value on your own :)
-
m-relay
<rucknium:monero.social> Old value?
-
DataHoarder
say, p2pool observer finds A at height H and c3pool finds B at H
-
DataHoarder
then B wins
-
DataHoarder
A will no longer be reported as block on next fetch
-
m-relay
<rucknium:monero.social> It looks like I have a visual bug when there is an orphan near chaintip. I will try to fix it soon.
-
DataHoarder
so if you track the orphan A data you probably need to look at previous dumps of info to see who owned it
-
DataHoarder
it looks good though!
-
m-relay
<rucknium:monero.social> So, I should refresh the pool data more often, perhaps.
-
DataHoarder
eh
-
DataHoarder
I'd say less often is fine, but the data will still be not reported
-
DataHoarder
it's probably "fine" if you keep previous csv
-
DataHoarder
I see you are basically sending a png via websocket, able to add links to the blocks themselves?
-
DataHoarder
you can probably expose this as a <svg> which would allow that instead
-
DataHoarder
plotting backend probably allows that
-
m-relay
<rucknium:monero.social> But shouldn't I try to query the API between the time that the pool finds the block and when it is confirmed to be orphaned?
-
DataHoarder
your Ip will probably get limited
-
m-relay
<rucknium:monero.social> Just re-running `monero-blocks` will keep the old data in the CSV, right? Not wipe it?
-
DataHoarder
yes
-
DataHoarder
it'll load it, run the code, then write it anew
-
DataHoarder
with old data + new data
-
DataHoarder
tbh, you should only launch this when a block is found
-
DataHoarder
I think monerod supports running an external program
-
DataHoarder
that way it's event based, as quick as needed
-
plowsof
--Block-notify iirc
-
DataHoarder
yep!
-
DataHoarder
have notification + fallback poll every 5 minutes
-
m-relay
<rucknium:monero.social> There is the plotly library that outputs javascript. I used it for a few plots here:
moneronet.info
-
m-relay
<rucknium:monero.social> But that's heavier and can be more complicated to implement. The R interface for network graphs in plotly seemed poorly maintained. And I can have more control using base R plots, using `igraph`, which is what it's using now.
-
DataHoarder
lemme see
-
DataHoarder
always fun learning to read a new language, R :)
-
m-relay
<rucknium:monero.social> That does make a lot of sense. Using --block-notify.
-
DataHoarder
-
m-relay
<rucknium:monero.social> I want to add more plots on hashpower share of the pools and attempted double-spend transactions, but this was the hard part. And no one has this visualization, but
miningpoolstats.stream/monero has hashpower share.
-
m-relay
<rucknium:monero.social> AFAIK, that's the "basis", but it is a plot of an igraph object, which is
-
m-relay
-
m-relay
<rucknium:monero.social> with more docs
r.igraph.org/reference/plot.common.html
-
DataHoarder
-
DataHoarder
seems it can be done but you need to make a custom wrapper for it
-
DataHoarder
well it's fine as png
-
DataHoarder
i see c3pool working on your graph so seems it's good
-
DataHoarder
I think that covers all the major pools in poolstats but if you want any other added, poke :)
-
m-relay
<rucknium:monero.social> Thanks a lot!
-
DataHoarder
also- they might lag a bit behind when reporting their own blocks on their APIs
-
DataHoarder
so maybe add 10-15s delay at least before checking on the script
-
DataHoarder
make sure it also doesn't run multiple times at the same time :)
-
DataHoarder
(only one instance is running)
-
DataHoarder
maybe adding a "n (0.00%) orphan blocks in the last 240 blocks" or so could be nice
-
m-relay
<rucknium:monero.social> Good idea.