Skip to content

Shrink on one worker#1280

Merged
gustavo-grieco merged 1 commit intomasterfrom
fix-shrink
Jul 5, 2024
Merged

Shrink on one worker#1280
gustavo-grieco merged 1 commit intomasterfrom
fix-shrink

Conversation

@arcz
Copy link
Copy Markdown
Member

@arcz arcz commented Jun 27, 2024

There was a high contention while shrinking with multiple workers at the same time. This locks shrinking to the same worker which solved the test. Fixes #1105.

Changes and implications:

  1. Only the worker which solved a test will shrink the test. Worker number is displayed in the UI while shrinking.
  2. If there is shrinking work, do it until the shrink limit and then go back to fuzzing. Fuzzing will be put on pause when all workers are shrinking.
  3. Test limit is unevenly distributed. When worker shrinks it doesn't work on its portion of test limit. This will be fixed in another PR.
  4. Refactored selectMainContract, mkTests and mkSignatureMap out of loadSpecified. This allows for more granular control to easier construct Env. Moved world to the Env and tests can be created before Env.
  5. Merged Campaign.updateTest and Test.updateOpenTest into Campaign.updateOpenTest.

TODO: Look into reintroducing multicore shrinking with better synchronization (#1249).

@arcz arcz requested a review from gustavo-grieco as a code owner June 27, 2024 12:17
@arcz arcz mentioned this pull request Jun 27, 2024
@arcz arcz added this to the Echidna 2.2.4 milestone Jun 27, 2024
@gustavo-grieco
Copy link
Copy Markdown
Collaborator

Let's update the number of workers to 3. We can probably pick a better number, but it should work while we determinate how to do that.

@gustavo-grieco gustavo-grieco merged commit ec5a3c1 into master Jul 5, 2024
@gustavo-grieco gustavo-grieco deleted the fix-shrink branch July 5, 2024 13:16
datradito pushed a commit to datradito/echidna-mcp that referenced this pull request Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug-Candidate]: Echidna multicore produces slower shrinking behavior

2 participants