tjb-altf4 / spacemesh-psm

Spacemesh monitoring, and intelligent management of post-services
Apache License 2.0
0 stars 0 forks source link

psm metrics: capture registration state during grace period #14

Open tjb-altf4 opened 1 month ago

tjb-altf4 commented 1 month ago

capture post registration, best candidate short of new API features is to capture from logs. pattern to in logs is similar to following, where each smesherID should have 1 or more entries corresponding to different poet servers.

to fulfill this feature:

2024-10-09T14:27:34.199+0800    INFO    node.nipostBuilder      waiting until poet round end    {"smesherID": "abc123", "poet_address": "https://backup-e1.team24.co", "round": "32", "wait time": "313h32m49.054541239s"}
2024-10-09T14:27:34.199+0800    INFO    node.nipostBuilder      waiting until poet round end    {"smesherID": "abc123", "poet_address": "https://eos-2.team24.co", "round": "32", "wait time": "313h32m51.775007745s"}
2024-10-09T14:27:34.199+0800    INFO    node.nipostBuilder      waiting until poet round end    {"smesherID": "abc123", "poet_address": "https://eos-3.team24.co", "round": "32", "wait time": "313h33m0.094991086s"}

Additionally we may wish to capture the proof submission, which typically happens at the beginning of grace period.

2024-10-09T14:00:25.328+0800    INFO    node.nipostBuilder      challenge submitted to poet proving service     {"poet": "https://backup-e1.team24.co", "smesherID": "abc123", "round": "32"}
2024-10-09T14:00:26.803+0800    INFO    node.nipostBuilder      challenge submitted to poet proving service     {"poet": "https://eos-3.team24.co", "smesherID": "abc123", "round": "32"}
2024-10-09T14:00:59.027+0800    INFO    node.nipostBuilder      challenge submitted to poet proving service     {"poet": "https://eos-2.team24.co", "smesherID": "abc123", "round": "32"}