Skip to content

feat(solana-indexer) PR 9: cover the ingester to decoder pipeline end to end - #4677

Draft
squadgazzz wants to merge 5 commits into
solana-indexer/PR8-persistfrom
solana-indexer/PR9-pipeline-test
Draft

feat(solana-indexer) PR 9: cover the ingester to decoder pipeline end to end#4677
squadgazzz wants to merge 5 commits into
solana-indexer/PR8-persistfrom
solana-indexer/PR9-pipeline-test

Conversation

@squadgazzz

@squadgazzz squadgazzz commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

Nothing exercised the ingester and the decoder as one pipeline, because the per-component tests stop at the channel boundary. This runs a proto SubscribeUpdate carrying a CreateOrder through the real ingester, channel and decoder, then asserts what arrived at the persistence seam.

The plan's PR 9 asked for adapters/fake.rs with a FakeStore and a FakeStream, plus a tests/smoke.rs integration test. Neither fake is needed. Ingester is generic over Stream, so futures::stream::iter is already the fake stream, and Persistence is a concrete struct rather than the Store trait the plan assumed, so a FakeStore has no trait to implement. An integration test under tests/ also cannot construct pub(crate) types. The test therefore lives in the crate, and Persistence grows a test-only recorder to make the writes observable while its bodies are no-ops.

Changes

  • Persistence records every write as a Call under #[cfg(test)]. The log is shared across clones, so a test hands one clone to a component and reads back what that component wrote.
  • One pipeline test drives stream::iter into Ingester, through the channel, into Decoder::run, and asserts the decoder persisted the OrderCreated event with watermark 41 for a slot-42 transaction. That also pins the slot - 1 watermark rule across the whole path.

How to test

New unit test. Verified it has teeth by flipping the expected watermark to 42 and confirming the failure.

Related issues

Stacked on #4676.

@squadgazzz squadgazzz changed the title solana-indexer: cover the ingester to decoder pipeline end to end feat(solana-indexer) PR 9: cover the ingester to decoder pipeline end to end Jul 28, 2026
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.

1 participant