Add a means to easily check if an external signer is signing blocks as expected
There are plans to add metrics to the dashboard concerning how many blocks were signed in a given reward cycle by a signer.
Create an RPC endpoint that reports the number of blocks signed by a given public key for perhaps a given reward cycle. Would involve introducing a table of signer public keys with reward cycle and number of blocks signed. As each block is processed, read the vector of signatures, and update the table accordingly.
To implement this, we would need to:
- Create a table in the chainstate DB with rows of
(public key, reward cycle ID, signature count) - Each time we process a Nakamoto block, check the signatures in its header and update the signer's
(public key, reward cycle ID, signature count)row. - Add an RPC endpoint that takes a reward cycle and public key as input, and returns the signature count
The table can be populated lazily -- i.e. the absence of a row for the given key and reward cycle can be treated the same as a row in which the signature count is zero.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.