Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrating vortexor with sigverifier #4424

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lijunwangs
Copy link

@lijunwangs lijunwangs commented Jan 13, 2025

sigverify integration for vortexor.

Problem

Summary of Changes

sigverify integration for vortexor.

Note the sigverify is only called and the packets sent to the dummy receiver. In next PR we will integrate a sender which will send the verified packets to the Validator side.

Fixes #

// Not interesed of banking tracing

let verifier = TransactionSigVerifier::new(non_vote_sender);
SigVerifyStage::new(tpu_receiver, verifier, "solSigVerTpu", "tpu-verifier")
Copy link
Author

Choose a reason for hiding this comment

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

Use different names.

@lijunwangs lijunwangs force-pushed the tpu_vortexor.sigverify.2 branch from 5ccef5b to 1e581d4 Compare January 17, 2025 01:35
Copy link

@alexpyattaev alexpyattaev left a comment

Choose a reason for hiding this comment

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

few nits and concerns with unbounded buffers

tpu_receiver: Receiver<solana_perf::packet::PacketBatch>,
non_vote_sender: TracedSender,
) -> SigVerifyStage {
// Not interesed of banking tracing

Choose a reason for hiding this comment

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

probably typo: of -> in

Choose a reason for hiding this comment

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

Also not sure what purpose this comment serves.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

@@ -53,12 +54,19 @@ pub fn main() {
let max_streams_per_ms = value_t_or_exit!(matches, "max_streams_per_ms", u64);
let exit = Arc::new(AtomicBool::new(false));
// To be linked with the Tpu sigverify and forwarder service
let (tpu_sender, _tpu_receiver) = unbounded();
let (tpu_sender, tpu_receiver) = unbounded();

Choose a reason for hiding this comment

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

Given that vortexor lives on a different host, would be nice to see some mechanism to control the max size of this queue in case the connection gets stuck. Are you sure we can not use a bounded channel here?

Copy link
Author

Choose a reason for hiding this comment

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

This was based on the current sig-verify code which uses unbounded channel. I do not think the vortexor on different changes natures regarding this. Sigverfiy is packets from this channel and do the verifications. I think it it changes it may actually be more performant. But I agree with you from defensive programming aspects, if we cannot guarantee the receiver is always faster the the sender, it is good practice to guard against excessive memory usage which could happen under load.

Copy link
Author

Choose a reason for hiding this comment

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

Will address in a flow-on PR. @alexpyattaev

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.

2 participants