Skip to content

test(surfpool): tighten surfpool roundtrip — surfpool is started but never queried #290

Description

@prasanna-anchorage

Follow-up from #202 (and unaddressed by stacked #285, #289).

What

surfpool_jupiter_swap_roundtrip (now run_idl_roundtrip after #285's refactor) starts a surfpool mainnet-fork instance, assigns it to _manager, then runs the local visual-sign parser on a synthetic transaction whose data is [discriminator] + [0u8; 32]. The assertion is just !payload.fields.is_empty(). The surfpool instance is dropped without ever being queried, simulated against, or otherwise used.

Where

src/chain_parsers/visualsign-solana/tests/common/mod.rs (post-#289) — search for let _manager = SurfpoolManager::start(...).

Why it matters

The PR titled "surfpool mainnet-fork integration for built-in IDL fuzz path" advertises mainnet-fork integration, but as written the test is an IDL-discriminator fuzz that happens to start surfpool as a slow side-effect. CI minutes and Helius RPC credits are spent starting a fork that contributes nothing to the test's signal. A real integration would, e.g.:

  • Use surfpool's simulateTransaction against a real on-chain program ID (loaded from the fork).
  • Pull an actual recent on-chain transaction via the forked RPC and feed it through the parser.
  • Assert specific output shape (named accounts resolved against real mint addresses, etc.).

Alternative: rename to reflect what it actually does (e.g. idl_fuzz not surfpool_fuzz) and drop the surfpool startup from this path; keep surfpool-backed tests as a separate, narrower suite.

Repro

cargo test -p visualsign-solana --test surfpool_fuzz surfpool_idl_jupiter -- --ignored --nocapture

The surfpool process starts, the parser runs in-process on synthetic bytes, the test passes regardless of what the fork is doing.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions