1

I wanted a way to check if a pool is having some sort of slot dispute with somebody else's pool for the right to mine a block. I couldn't find a solution for that, maybe using dbsync I don't know exactly if its possible to check that information without be the owner of that pool in question. I'm accepting suggestions or directions on how to query these block disputes for a pool analysis tool we are creating.

thank you

1
  • db-sync only records accepted blocks. Blocks that are rolled back are removed from the database before the roll forward. Aug 12, 2022 at 6:22

3 Answers 3

1

You can also check the logs on your block producer or on a relay.

This is how a slot battle looks like in the logs (it happened less than half an hour ago):

Dec 22 07:16:53 relay4 bash[3623433]: #033[35m[relay4:cardano.node.ChainDB:Notice:365]#033[0m [2021-12-22 07:16:53.43 UTC] Chain extended, new tip: 701733ec51d44a307341e9fecb3ae7b921b3a8529fffcf1cda958aeaac813c9c at slot 48591122
Dec 22 07:16:53 relay4 bash[3623433]: #033[34m[relay4:cardano.node.ChainDB:Info:365]#033[0m [2021-12-22 07:16:53.60 UTC] Block fits onto some fork: 0cd72eebab15a4e66b3225694928938362c0aef931186ea5aaeffd9830753c63 at slot 48591122
Dec 22 07:16:53 relay4 bash[3623433]: #033[34m[relay4:cardano.node.ChainDB:Info:365]#033[0m [2021-12-22 07:16:53.66 UTC] Valid candidate 0cd72eebab15a4e66b3225694928938362c0aef931186ea5aaeffd9830753c63 at slot 48591122
Dec 22 07:16:53 relay4 bash[3623433]: #033[35m[relay4:cardano.node.ChainDB:Notice:365]#033[0m [2021-12-22 07:16:53.66 UTC] Switched to a fork, new tip: 0cd72eebab15a4e66b3225694928938362c0aef931186ea5aaeffd9830753c63 at slot 48591122
0

db-sync doesn't track forks so can't be analyzed to identify slot battles. There are some 3rd party tools, such as cncli that do track forks so you can analyze the data from the view of one of your nodes. Note that it can only be analyzed if it's running when it happens though. Here's a reference video that could help in understanding what they are, why they occur and how to analyze them using cncli and sqlite queries: https://www.youtube.com/watch?v=Cm5pBM7UYa0

0

On a relay node running cardano-node install cncli and get it fully sync'ed.

Query the cncli database using sqlite:

sqlite3 cncli.db

.schema chain

select id, block_number, slot_number, hash, pool_id, orphaned from chain where pool_id = 'the_poolid_you_want_to_check' and orphaned = 1;

That should give you some ideas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.