Skip to content
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

Fix Voluntary Exits Panic #5688

Merged
merged 4 commits into from
Apr 30, 2020
Merged

Fix Voluntary Exits Panic #5688

merged 4 commits into from
Apr 30, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Apr 30, 2020

What type of PR is this?

Bug Fix

What does this PR do? Why is it needed?

It prevents the rpc server from panicking if it receives an invalid exit proposal. It checks that
the exit object exists and that the signature is valid.

A regression test has also been added

Which issues(s) does this PR fix?

N.A

Other notes for review

@nisdas nisdas requested a review from a team as a code owner April 30, 2020 07:19
@nisdas nisdas added the Ready For Review A pull request ready for code review label Apr 30, 2020
Co-Authored-By: Shay Zluf <thezluf@gmail.com>
Comment on lines 173 to 181
_, err = server.ProposeExit(context.Background(), req)
if err == nil {
t.Fatal("Expected error for no signature existing existing")
}

_, err = server.ProposeExit(context.Background(), req)
if err == nil {
t.Fatal("Expected error for no signature existing existing")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_, err = server.ProposeExit(context.Background(), req)
if err == nil {
t.Fatal("Expected error for no signature existing existing")
}
_, err = server.ProposeExit(context.Background(), req)
if err == nil {
t.Fatal("Expected error for no signature existing existing")
}
_, err = server.ProposeExit(context.Background(), req)
if err == nil {
t.Fatal("Expected error for no signature existing existing")
}

nisdas and others added 2 commits April 30, 2020 15:23
Copy link
Contributor

@shayzluf shayzluf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
thanks

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #5688 into master will decrease coverage by 21.88%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master    #5688       +/-   ##
===========================================
- Coverage   41.86%   19.98%   -21.89%     
===========================================
  Files         272      239       -33     
  Lines       23273    20895     -2378     
===========================================
- Hits         9744     4175     -5569     
- Misses      11762    15923     +4161     
+ Partials     1767      797      -970     

@prylabs-bulldozer prylabs-bulldozer bot merged commit 3a295fb into master Apr 30, 2020
@delete-merged-branch delete-merged-branch bot deleted the fixProposePanic branch April 30, 2020 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants