SP
perf: cache pre-forge preprocessing outputs
spaceandtimefdn/sxt-proof-of-sql#1145

Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimefdn/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.

/claim #557

Please go through the following checklist

Rationale for this change

Issue #557 is about reducing CI test time. The rewarded Dory setup cache PR #1136 targets a different hotspot. This change targets the Rust EVM tests, where the Solidity wrapper currently deletes and regenerates every .post.sol file before each forge invocation.

What changes are included in this PR?

  • Add an input fingerprint cache in solidity/scripts/pre_forge.sh.
  • Skip regeneration when .presl sources and the Yul preprocessor have not changed.
  • Make pre_forge.sh clean remove generated files without preprocessing first.
  • Add regression tests for cache hits, invalidation, and clean behavior.

Are these changes tested?

Yes.

  • python3 -m unittest discover -s solidity/preprocessor -p 'test_pre_forge.py'\n- PYTHONPATH=/tmp/sxt-preforge-pydeps python3 -m pytest solidity/preprocessor\n- PYTHONPATH=/tmp/sxt-preforge-pydeps python3 -m black --check solidity/preprocessor\n- bash -n solidity/scripts/pre_forge.sh\n- PYTHONPYCACHEPREFIX=/tmp/pycache python3 -m py_compile solidity/preprocessor/yul_preprocessor.py solidity/preprocessor/test_pre_forge.py\n\nI also attempted source scripts/run_ci_checks.sh, but it is currently broken on main: it extracts commands with literal run: prefixes and then tries to execute run: as a shell command.

Claim

Total prize pool $100
Total paid $0
Status Pending
Submitted March 16, 2026
Last updated March 16, 2026

Contributors

JA

javery556

@javery556

100%

Sponsors

SP

Space and Time

@spaceandtimelabs

$100