Replying to @Joshuef here: Safe Network Dev Update - December 17, 2020 - #124 by joshuef
I’m not focussed on vdash now but would like to maintain what I have while making it as accurate as possible. I’m doing simple string matching, so not too bothered about the format of the last part (the message) of each entry.
If you can generate or point me to log messages that I can use to detect the following in a single message they would be easy for me to incorporate:
- number of Infants/Adults/Elders per section (and any similar stats). I no longer have this working as the logs no longer seem to provide this information.
I have something for counting PUTS and GETS but think I’m counting GETS incorrectly at the moment, and not sure if the logs have this in a convenient form:
- a single GET of any data type (which may result in a reward for this node)
- a single PUT of any data type (that may later reward a GET for this node)
Currently I’m using the following messages to identify a single PUT or GET, but don’t know if they are ‘accurate’ (i.e. one message for each event).
PUT:
[sn_node] INFO 2020-12-18T14:34:23.250257713+00:00 [src/chunk_store/mod.rs:134] Writing chunk succeeded!
GET (matching the " response: QueryResponse::Get
" to cover multiple data types):
[sn_node] INFO 2020-12-19T18:09:39.968758995+00:00 [src/node/mod.rs:223] Running as Node: SendToSection [ msg: MsgEnvelope { message: QueryResponse { response: QueryResponse::GetSequence(Success), id: MessageId(f43e31..), correlation_id: MessageId(7a42ea..), query_origin: Client(157bd5..) }, origin: MsgSender { entity: Entity::TransientElderKey::Ed25519(2fa316..)BlsShare(97be30..)ElderNode(Metadata), sig: Some(EntitySignature::Elder::BlsShare(..)) }, proxies: [] } ]
For node agebracket I’m looking for either of the following and picking Infant, Adult or Elder off the end of the message:
[sn_node] INFO 2020-12-18T14:33:49.799524575+00:00 [src/node/mod.rs:104] We are Infant
or
[sn_node] INFO 2020-12-19T17:50:07.785869066+00:00 [src/node/node_duties/network_events.rs:44] Node promoted to Elder
All the above are ‘working’ but I may not be counting GETS and PUTS accurately. Note that Gabriel suggested using a different message for GET (but with additional filtering by chunk ID) but I didn’t find this particular message in my logs. I found other variants of it, so I think it would be quite tricky to base stats on it:
[sn_node] INFO 2020-12-19T15:11:11.871542122-03:00 [src/node/mod.rs:205] Running as Adult: RunAsChunkStore(ReadChunk(MsgEnvelope { message: Query { query: Data(Public(bbe703..)), id: MessageId(f10c88..) }....