-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add function for checking misbehaviors in Vetomint #495
base: main
Are you sure you want to change the base?
Add function for checking misbehaviors in Vetomint #495
Conversation
e51d3a0
to
def5873
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the overall structure should be revised.
- Reporting misbehaviors should be done on the same basis of feeding ConsensusEvents. However, the current interface of
check_misbehavior()
is confusing. Why does it takecheck_round
andcheck_proposal
? When is the function supposed to be called? Why did you take those two very particular parameters? - Don't use
println!()
.It seems you just printed whenever there is no misbehavior. This is just so random. - Please add some comments about important code. For example, I'd put doc comments for every
check_~
functions. - The local variable
valid_prevotes
is named very misleadingly. Why is itvalid
? You just filter prevotes by their rounds.
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 ans2) I removed all ans3) I already know what comment I should put for evenry ans4) I changed 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) |
fd7230b
to
3e047e6
Compare
implement for the issue, #473