-
Notifications
You must be signed in to change notification settings - Fork 407
Misc fuzzing tweaks #1939
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
Misc fuzzing tweaks #1939
Conversation
4dd6e17
to
64c9916
Compare
Codecov ReportBase: 90.71% // Head: 90.71% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1939 +/- ##
==========================================
- Coverage 90.71% 90.71% -0.01%
==========================================
Files 97 97
Lines 50579 50579
Branches 50579 50579
==========================================
- Hits 45885 45882 -3
- Misses 4694 4697 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
41c2743
to
56f54c9
Compare
Will merge this pre-0.0.114, but gonna let it sit for now. |
hashbrown by default uses ahash, which may be a bit faster, but more importantly, if we upgrade to hashbrown 0.13/ahash 0.8 we can make it use a constant randomization factor, making fuzzers happier.
In newer versions of `hashbrown` this code would be broken. While we aren't updating `hashbrown` any time soon (as it requires an MSRV bump), it is useful to swap for a newer `hashbrown` when fuzzing, which this makes easier.
This fixes a crash in the `full_stack_target` fuzz test (found by Chaincode's generous fuzzing infrastructure!) but ultimately is a better error code - a peer disconnecting before we can fund a channel isn't a "misuse error" its an unavailable channel.
f9bafa6
56f54c9
to
f9bafa6
Compare
Oops, this ended up needing rebase. In any case, I also fixed a full_stack_target crash in a new, last commit. Will go ahead and land this so it doesn't get stale again instead. |
@@ -2552,7 +2552,7 @@ where | |||
let per_peer_state = self.per_peer_state.read().unwrap(); | |||
let peer_state_mutex_opt = per_peer_state.get(counterparty_node_id); | |||
if let None = peer_state_mutex_opt { | |||
return Err(APIError::APIMisuseError { err: format!("Can't find a peer matching the passed counterparty node_id {}", counterparty_node_id) }) | |||
return Err(APIError::ChannelUnavailable { err: format!("Can't find a peer matching the passed counterparty node_id {}", counterparty_node_id) }) |
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.
On mobile so I could be wrong but there may be a few more occurrences of this
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.
Yea, there are, I'll work with @ViktorTigerstrom to address those as a part of #1945, for now let's just land this to fix the fuzzers on git HEAD.
Nothing big, just some cleanup.