Skip to content

Conversation

@andrew-fleming
Copy link
Contributor

Types of changes

What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Fixes #208.

PR Checklist

  • I have read the Contributing Guide
  • I have added tests that prove my fix is effective or that my feature works
  • I have added documentation of new methods and any new behavior or changes to existing behavior
  • CI Workflows Are Passing

This PR proposes to improve compile and testing performance.

  • Compact compile accepts a directory arg that will only compile that directory
    • If that directory uses modules from security and/or utils, those modules will still be compiled first
  • Turbo is better structured and runs in parallel. Most modules depend on security and/or utils, so those two modules are compiled first in parallel and then the other modules are compiled in parallel (or the modules of a single directory)
  • Tests do not require the full build since they just need the used mock contracts' contract.cjs from artifacts. In other words, compiling with --skip-zk is sufficient to run tests

@andrew-fleming andrew-fleming requested a review from a team as a code owner August 18, 2025 06:15
@andrew-fleming andrew-fleming changed the title Improve turbo restructure Improve compilation and testing performance Aug 18, 2025
Co-authored-by: ⟣ €₥ℵ∪ℓ ⟢ <34749913+emnul@users.noreply.github.com>
Signed-off-by: Andrew Fleming <fleming.andrew@protonmail.com>
andrew-fleming and others added 3 commits August 27, 2025 20:23
Co-authored-by: ⟣ €₥ℵ∪ℓ ⟢ <34749913+emnul@users.noreply.github.com>
Signed-off-by: Andrew Fleming <fleming.andrew@protonmail.com>
Copy link
Contributor

@emnul emnul left a comment

Choose a reason for hiding this comment

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

Need for speed!

andrew-fleming and others added 2 commits August 27, 2025 22:47
Co-authored-by: ⟣ €₥ℵ∪ℓ ⟢ <34749913+emnul@users.noreply.github.com>
Signed-off-by: Andrew Fleming <fleming.andrew@protonmail.com>
Copy link
Contributor

@emnul emnul left a comment

Choose a reason for hiding this comment

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

Re-approve

@andrew-fleming andrew-fleming merged commit 5dd9470 into OpenZeppelin:main Aug 28, 2025
6 checks passed
@andrew-fleming andrew-fleming deleted the improve-turbo-restructure branch August 28, 2025 14:18
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.

Improve compilation and test performance

2 participants