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

WIP: use gm tpuconnectionmanager for proxy #218

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

grooviegermanikus
Copy link
Collaborator

@grooviegermanikus grooviegermanikus commented Sep 28, 2023

  • use (copy) tpu_connection_manager and notably active_connection from pratik's implementation
  • improve auto connection from lite-rpc to quic-proxy

Shutdown(Pubkey),
}

struct ActiveConnection {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: no Clone anymore which IMO is good

});

},
Ok(BroadcastMessage::Shutdown(tpu_identity)) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

wdyt? sending shutdown in line with transaction payload in same channel will remove race condition between transactions remaining in queue while connection thread is shutting down

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok i think, removes one extra channel.

@@ -0,0 +1,283 @@
#![allow(unused_imports)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can make changes to original code instead of coping it.

let broadcast_receiver = self.broadcast_sender.subscribe();

active_connection.start_listening(broadcast_receiver, max_uni_stream_connections);
self.identity_to_active_connection.insert(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Connections are never removed from this map. They are always added.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

eh! don't scare me ;) - look, I guess you are wrong:

2023-09-29T15:08:05.018721Z INFO update_connections: solana_lite_rpc_quic_forward_proxy::outbound::tpu_connection_manager: identity_to_active_connection: 9
...
2023-09-29T15:08:13.737999Z INFO update_connections: solana_lite_rpc_quic_forward_proxy::outbound::tpu_connection_manager: identity_to_active_connection: 3

});

},
Ok(BroadcastMessage::Shutdown(tpu_identity)) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok i think, removes one extra channel.

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