simperby icon indicating copy to clipboard operation
simperby copied to clipboard

Add function for checking misbehaviors in Vetomint

Open Jeongseup opened this issue 1 year ago • 1 comments

implement for the issue, #473

Jeongseup avatar Aug 11 '23 16:08 Jeongseup

I modified with your review. but, I don't fully understand the vetomint. so I'm not sure which place i called the check~ function is correct. and some check_invalid_~ functions is in unimplement.

ans1) I deleted the check_misbehavior function. because it didn't seem necessary when I looked at it again. Instead of, I add some check misbehavior functions for responsing ConsensusResponse::ViolationReport enum which will be used in (https://github.com/postech-dao/simperby/blob/main/consensus/src/state.rs#L225C7-L225C7)

ans2) I removed all println!() macro in my PR

ans3) I already know what comment I should put for evenry check~ function. but I'm not sure what to say. so, Can you give me some guideline for me?

ans4) I changed unimplement state at some functions which had valid_prevotes local variables.


And also, I have a question for this PR. I added some local variable like that (https://github.com/Jeongseup/simperby/blob/vetomint%2Fadd-function-for-checking-misbehaviors/vetomint/src/misbehavior.rs#L82) Because that's better to see codes by others. Is it alright?

Jeongseup avatar Aug 27 '23 09:08 Jeongseup