tests/fuzzers/les: add fuzzer for les server handler#22282
Merged
zsfelfoldi merged 4 commits intoethereum:masterfrom Feb 20, 2021
Merged
tests/fuzzers/les: add fuzzer for les server handler#22282zsfelfoldi merged 4 commits intoethereum:masterfrom
zsfelfoldi merged 4 commits intoethereum:masterfrom
Conversation
4e39767 to
b9003da
Compare
tests: update les fuzzer tests/fuzzer/les: release resources tests/fuzzer/les: pre-initialize all resources
b9003da to
acbcddd
Compare
acbcddd to
347afb4
Compare
| // If so, deduct the max cost from the flow control buffer. | ||
| accept := func(reqID, reqCnt, maxCnt uint64) bool { | ||
| // Short circuit if the peer is already frozen or the request is invalid. | ||
| inSizeCost := h.server.costTracker.realCost(0, msg.Size, 0) |
Member
There was a problem hiding this comment.
Would be super super nice if we can encapsulate these "before-serving" logic and "after-serving" logic into two separate functions: "prepare" and "finalize". The execution is in the middle.
Just throw out the thoughts here. We can open the following PR if you also think it's a good idea.
Contributor
Author
There was a problem hiding this comment.
Sure, let's do it in a follow-up PR.
Member
|
Ran the fuzzer for a while, no crash detected. |
9 tasks
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the LES server handler in order to make fuzzer testing possible and implements the fuzzer.
Replaces #22173 and #22237