1

I'm trying to understand the part of Solana's codebase where new transactions for Geyser are notified.

I've observed functions in GeyserService like transaction_update_receiver that seem to handle the updates. However, I'm having difficulty identifying where in the codebase the notification is triggered.

Can someone provide guidance or point me to the relevant section?

1 Answer 1

0

It's a little tricky to follow, but it all starts with the transaction_notifier which is part of the Geyser plugin service. You can follow how it gets pulled out at https://github.com/solana-labs/solana/blob/30055b02b5f9192be8851f03522b5f388933d659/core/src/validator.rs#L633 and eventually added to the TransactionStatusService.

TransactionStatusService spawns a thread which constantly receives new transactions from a receiver: https://github.com/solana-labs/solana/blob/30055b02b5f9192be8851f03522b5f388933d659/rpc/src/transaction_status_service.rs#L37

And finally, the sender side goes to many different parts of the validator: the TVU (to send notifications during replay), TPU (to send notifications when it's leader), and ProcessBlockstore (which mainly affects startup). You can trace transaction_status_sender through different parts of the first file (core/src/validator.rs) to see where it gets added, and then see where it gets used in core/src/tvu.rs and core/src/tpu.rs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.