ChaosDAO-org / InternalGov-2.0

Monitor governance referendas on Polkadot/Kusama - Create a thread for each referenda for internal users to discuss before proxy account makes the vote.
Apache License 2.0
21 stars 14 forks source link

RPC health check #45

Open Nadro-J opened 5 months ago

Nadro-J commented 5 months ago

Implement a function that periodically checks the health of the RPC node configured in .env; in light of recent errors caused by IBP nodes resyncing. When an issue is flagged, e-mail the administrator.

The following error was caused when autonomous_voting was running. One of the steps to determine the age of a proposal is to check when it was proposed by grabbing the timestamp using Timestamp.Now().

substrateinterface.exceptions.SubstrateRequestException: {'code': 4003, 'message': 'Client error: Api called for an unknown Block: State already discarded for 0xc0e405cc3f51b1d61f689a384f022b24409dca9b0d589661f64e4260ebb96b38'}
Nadro-J commented 1 month ago

Setting to P1 priority.

It's been noted that after 30 - 35 days the bot can sometimes throw an array of errors relating to SubstrateInterface / scalecodec which can result in the following until a restart of the pm2 process has been initiated:

These are key features that need to be running seamlessly without interruption which is why the priority of resolving this has increased.