Contrib script to detect invalid chains #100

Open
opened 2 years ago by duke · 0 comments
duke commented 2 years ago
Owner

It would be useful to have a script in ./contrib/ that can be run from cron, that looks at debug.log and looks for InvalidChainFound errors:

2022-01-27 05:31:42 InvalidChainFound: invalid block=000000081083748e2314f6bda648c7e83c909c5aaf2076ca16cf827d9c191ff1  height=817472  log2_work=48.5575  date=2022-01-27 05:27:27
2022-01-27 05:31:42 InvalidChainFound:  current best=000000047b12fb5800dcd5227b6b9e07390949d380737ea2c1d881ea0c07baf6  height=817471  log2_work=48.557499  date=2022-01-27 05:20:18

There is related data in the output of getchaintips as well.

The intended use case would be for services like exchanges/pools/lite wallet operators to run it in cron and then be notified (via email/TG/etc) if such an error is found, which shouldn't normally happen and is a good reason for manual inspection. This kind of error indicates a consensus bug or something similar could be happening.

It would be useful to have a script in ./contrib/ that can be run from cron, that looks at debug.log and looks for InvalidChainFound errors: ``` 2022-01-27 05:31:42 InvalidChainFound: invalid block=000000081083748e2314f6bda648c7e83c909c5aaf2076ca16cf827d9c191ff1 height=817472 log2_work=48.5575 date=2022-01-27 05:27:27 2022-01-27 05:31:42 InvalidChainFound: current best=000000047b12fb5800dcd5227b6b9e07390949d380737ea2c1d881ea0c07baf6 height=817471 log2_work=48.557499 date=2022-01-27 05:20:18 ``` There is related data in the output of `getchaintips` as well. The intended use case would be for services like exchanges/pools/lite wallet operators to run it in cron and then be notified (via email/TG/etc) if such an error is found, which shouldn't normally happen and is a good reason for manual inspection. This kind of error indicates a consensus bug or something similar could be happening.
onryo was assigned by duke 2 years ago
duke self-assigned this 2 years ago
duke added the
feature
label 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.