Skip to content

Add fast Foundry profile - #303

Merged
Kubuxu merged 2 commits into
mainfrom
misc/faster-dev
Aug 17, 2026
Merged

Add fast Foundry profile#303
Kubuxu merged 2 commits into
mainfrom
misc/faster-dev

Conversation

@Kubuxu

@Kubuxu Kubuxu commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a fast Foundry profile for local development while retaining optimized IR for production builds.

Changes

  • Add profile.fast with IR and optimizer disabled.
  • Add make build-fast and make test-fast.
  • Use separate ignored out-fast/ and cache-fast/ directories.
  • Run the fast profile in CI and document it in the README.
  • Refactor two stack-heavy PDPVerifier paths so non-IR compilation succeeds.
  • Make storage-read assertions portable across compiler configurations while preserving exact write and storage-growth checks.

Performance

Clean full-suite time:

  • Production profile: 117.72s
  • Fast profile: 8.42s
  • Approximately 14× faster

Add a non-IR, unoptimized profile with isolated artifacts for faster local builds and tests. Refactor stack-heavy verifier paths so the standard pipeline compiles, make storage-read assertions portable across compiler settings, and wire the profile through Make, documentation, and CI.

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
@Kubuxu
Kubuxu requested a review from wjmelements as a code owner August 17, 2026 16:21
@FilOzzy FilOzzy added this to FOC Aug 17, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Aug 17, 2026
@wjmelements

Copy link
Copy Markdown
Contributor

I think the reason for the other changes is to fix the stack-too-deep error. If we could fix that everywhere, we could actually run forge coverage, which would help a lot with testing.

@Kubuxu

Kubuxu commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

Yes, it resolves stack-too-deep.

@Kubuxu

Kubuxu commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

forge coverage works now.

Comment thread src/PDPVerifier.sol
Comment thread src/PDPVerifier.sol
Comment on lines +605 to +606
// forge-lint: disable-next-line(asm-keccak256)
bytes32 targetHash = keccak256(pieceCid.data);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

create issue to fix asm-keccak256. solidity isn't very good at this kind of thing

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was looking at it and it is really ugly, so I decided not to pursue it.

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Comment thread foundry.toml
@github-project-automation github-project-automation Bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC Aug 17, 2026
@Kubuxu
Kubuxu merged commit eeb764a into main Aug 17, 2026
3 checks passed
@Kubuxu
Kubuxu deleted the misc/faster-dev branch August 17, 2026 23:55
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Aug 17, 2026
@github-project-automation github-project-automation Bot moved this to 🎉 Done in PDP Aug 17, 2026
Comment thread src/PDPVerifier.sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done
Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants