in StreamingOrdered mode the slot buffer is fed one event at a time, but every
event parsed from the same transaction carries that transaction's tx_index.
push_streaming bumps the streaming watermark to tx_index + 1 as soon as it
releases the first event, so the rest of that transaction's events have
tx_index < watermark, fall into the "already delivered" branch and get dropped
without any trace.
so any transaction that parses into more than one dex event (a swap route that
touches several pools, a create + buy, and so on) only ever delivered its first
event when order_mode was StreamingOrdered. Unordered, Ordered and MicroBatch
were not affected.
fix:
- push_streaming now takes all events of one (slot, tx_index) as a group so the
watermark advances once per transaction instead of once per event
- the buffered drain advances the watermark per distinct tx_index, since a slot
can now hold several events under the same index
- the ordered buffers use a stable sort so events inside one transaction keep
the order the parser produced them in, sort_unstable could shuffle equal keys
added tests for the multi event transaction case and for releasing buffered out
of order multi event transactions.
clear active_subscription when the yellowstone stream task exits or subscribe fails, so callers are not stuck on "already subscribed" after a disconnect.
replace unwrap/expect in grpc pool parsing with validation and skip malformed account or transaction updates instead of panicking the whole stream.
Route gRPC, ShredStream, and account parsing through sol-parser-sdk.
Remove local protocol parsing implementations.
Depend on sol-parser-sdk v0.4.8 from crates.io.
- Extend on-chain Pool layout (is_cashback_coin, 7-byte reserved, 244 bytes)
with backward-compatible decode for 236-byte legacy accounts
- Decode Buy/Sell program logs manually: min_base_amount_out, ix_name,
cashback fields; optional sell cashback when payload >= 368 bytes
- Set ix_name on buy / buy_exact_quote_in instructions; merge new fields
in CPI log merger
- Add read_i64_le helper and pool layout unit test
Made-with: Cursor
- global_state: only decrement signature_count when remove() actually removed entry
- types: bounds-check program_id_index and account indices in swap extraction
- types: require data.len() >= 9/12 before slicing token instruction data
- types: use i32 for current_index and safe skip count to avoid i8 truncation/UB
- event_parser: encode recent_blockhash only when len() == 32; pass i32 to swap parsers
Made-with: Cursor
- Remove standalone bs58 dependency and rely on the solana_sdk re-export
- Switch system and token program IDs to the idiomatic spl_token / solana_sdk constants
- Use pubkey! and LazyLock for cleaner program ID initialization
- Alias solana_entry::Entry as SolanaEntry to avoid a naming conflict with gRPC types
- Remove unused FromStr imports and some redundant logic
- Add PumpFunTradeEvent.account: Option<Pubkey> for the 17th instruction
account (index 16), labeled as 'Account' on block explorers.
- Fill account in parse_buy_instruction, parse_buy_exact_sol_in_instruction,
and parse_sell_instruction when accounts.get(16) is present.
- Merge account from CPI log event into instruction event when merging.
Made-with: Cursor
- EventMetadata: add recent_blockhash (Option<Vec<u8>>)
- gRPC path: extract from message.recent_blockhash, thread through parse_instruction_events_from_grpc_transaction and parse_events_from_grpc_instruction
- VersionedTransaction path: get from message.recent_blockhash(), pass into parse_events_from_instruction
- BlockMeta event: pass None for recent_blockhash
Made-with: Cursor
- Remove 'wide' and 'simd_utils.rs', rely on compiler auto-vectorization.
- Deduplicate swap parsing in 'types.rs' and 'merger_event.rs' using generic traits and local macros.
- Improve signature cleanup in 'global_state.rs' to avoid large heap allocations.
- Replace manual metadata accessors in 'traits.rs' with a macro for all variants.
- Remove unused types (ParseResult, ProtocolInfo) and legacy commented code.
- Fix Clippy lints (is_empty, copied) and restore missing trait imports.
- Add tx_index to TransactionWithSlot (entry index), pass to parser
- Emit PumpFun Migrate even when no CPI (shred gets instruction-only)
- Merge: only overwrite Create/CreateV2 with CPI when value non-default
- Rename transaction_index -> tx_index across codebase
- Add docs/SHREDSTREAM_LIMITATIONS.md (ALT/CPI limits, field completeness)
- Comment shred path: static_account_keys only, no inner_instructions
Made-with: Cursor