Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Aug 20, 2021

Previously it would take 10 seconds to run this input, now it takes 10ms: clusterfuzz-testcase-blockfilter-5022838196142080.log

The fix is moving the MatchAny out of the hot loop.

Also, to avoid unlimited runtime, cap the hot loop at 30k iterations.

@fanquake fanquake added the Tests label Aug 20, 2021
@maflcko
Copy link
Member Author

maflcko commented Aug 20, 2021

cc @practicalswift 🐈

@GeneFerneau
Copy link

Approach ACK fa2547f

Awesome perf gains from a small change!

@maflcko maflcko merged commit 84be9a8 into bitcoin:master Aug 26, 2021
@maflcko maflcko deleted the 2108-fuzzBlockfilter branch August 26, 2021 06:11
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 28, 2021
fa2547f fuzz: Avoid timeout in blockfilter fuzz target (MarcoFalke)

Pull request description:

  Previously it would take 10 seconds to run this input, now it takes 10ms: [clusterfuzz-testcase-blockfilter-5022838196142080.log](https://github.com/bitcoin/bitcoin/files/7021883/clusterfuzz-testcase-blockfilter-5022838196142080.log)

  The fix is moving the `MatchAny` out of the hot loop.

  Also, to avoid unlimited runtime, cap the hot loop at 30k iterations.

ACKs for top commit:
  GeneFerneau:
    Approach ACK [fa2547f](bitcoin@fa2547f)

Tree-SHA512: a04e7388856930ec81222da8f05b665a923fe9482aeb4c55c9be4561aa7320a0703dbbf8d438ae92854e877a8e3b46777a29c0b652b8f34c29c2142cc5d63ccb
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants