Skip to content

feat: add surfpool auto-download and enable surfpool for all tests#2227

Merged
sergeytimoshin merged 15 commits into
mainfrom
jorrit/feat-add-surfpool
Feb 2, 2026
Merged

feat: add surfpool auto-download and enable surfpool for all tests#2227
sergeytimoshin merged 15 commits into
mainfrom
jorrit/feat-add-surfpool

Conversation

@ananas-block
Copy link
Copy Markdown
Contributor

@ananas-block ananas-block commented Jan 31, 2026

  1. Add surfpool as default test validator replacement via --use-surfpool CLI flag (default: true,
    --no-use-surfpool for solana-test-validator)
  2. Add surfpool binary auto-download and version management (ensureSurfpoolBinary, version pinned to
    v1.0.1-light)
  3. Add getSurfpoolArgs() builder that maps --bpf-program, --upgradeable-program, and --account-dir flags
    to surfpool CLI args
  4. Add warp_to_slot() to LightClient using surfpool's surfnet_timeTravel RPC for instant slot advancement
    in tests
  5. Fix killProcess() to exclude own PID and parent PID, preventing SIGKILL of parent shell; fix
    spawnBinary() to close inherited FDs and call unref()
  6. Update killTestValidator() to also kill surfpool processes and fall back to port-based kill
  7. Update spawn_validator() in Rust client to wait for CLI completion when using surfpool (instead of
    fire-and-forget)
  8. Pass Photon --start-slot from surfpool's first available block so indexer starts from the correct slot
  9. Migrate 18 JS e2e test files from getTestRpc(lightWasm) to createRpc(), removing WasmFactory and
    TestRpc dependencies because surfpool getTransactionSignatures doesnt return more than 30 signatures
  10. Replace slot-polling loops with warp_to_slot() in forester tests (compressible ctoken, compressible
    pda, batched state async indexer)

Add auto-download of surfpool binary to Light CLI following the prover
binary pattern. The CLI now downloads surfpool from GitHub releases to
~/.config/light/bin/surfpool when --use-surfpool is used. Also set
use_surfpool: true as the default in LightValidatorConfig and in all
explicit test configurations across the repo.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 31, 2026

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (5)
  • wip
  • draft
  • temp
  • test
  • experimental

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jorrit/feat-add-surfpool

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Forward upgradeable programs to surfpool via --upgradeable-program flag
  instead of --bpf-program, enabling proper programdata account creation
- Add async warp_to_slot to LightClient using reqwest for surfpool's
  surfnet_timeTravel RPC method
- Update forester tests to use async warp_to_slot
- Add local surfpool binary discovery in ensureSurfpoolBinary for development
@ananas-block ananas-block force-pushed the jorrit/feat-add-surfpool branch from b1d53b3 to f64b7df Compare January 31, 2026 15:14
Check installed surfpool version before use. If the version doesn't
match the expected SURFPOOL_VERSION, re-download from the release.
Also update README example with use_surfpool field.
Prevents surfpool from trying to start its explorer/studio web UI
during tests, avoiding "Address already in use" errors.
Helps debug photon/surfpool crashes on CI by printing the log file
contents instead of only the exit code.
- Skip the test that creates a dummy program .so file (surfpool requires
  valid ELF binaries for --bpf-program)
- Add surfpool to the cleanup function so it is killed between tests
@ananas-block ananas-block force-pushed the jorrit/feat-add-surfpool branch from 3984447 to 1487e8a Compare February 2, 2026 04:12
@ananas-block ananas-block force-pushed the jorrit/feat-add-surfpool branch from 1487e8a to 78c1118 Compare February 2, 2026 04:36
Copy link
Copy Markdown
Contributor

@sergeytimoshin sergeytimoshin left a comment

Choose a reason for hiding this comment

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

🚀

@sergeytimoshin sergeytimoshin merged commit 7737e62 into main Feb 2, 2026
33 checks passed
@sergeytimoshin sergeytimoshin deleted the jorrit/feat-add-surfpool branch February 2, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants