-
Notifications
You must be signed in to change notification settings - Fork 65
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
grpc multiplexing integrate #255
Conversation
@@ -295,3 +308,11 @@ fn parse_host_port(host_port: &str) -> Result<SocketAddr, String> { | |||
Ok(addrs[0]) | |||
} | |||
} | |||
|
|||
// http://mango.rpcpool.com/c232ab232ba2323 | |||
fn obfuscate_rpcurl(rpc_addr: &str) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this
} | ||
} | ||
|
||
pub fn create_grpc_multiplex_subscription( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should take vector of gprc_add and grpc_x_token.
grpc_addr, | ||
grpc_x_token.is_some() | ||
); | ||
if let Some(ref grpc_addr2) = grpc_addr2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iterate and create the connections accordingly.
@@ -46,6 +46,10 @@ pub struct Config { | |||
pub grpc_addr: String, | |||
#[serde(default)] | |||
pub grpc_x_token: Option<String>, | |||
#[serde(default)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it Vec instead of adding another argument.
Example :
#[arg(short, long, value_delimiter = ',')]
pub grpc_addr: Vec<String>,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworked it, but not as vector .. that's really an headache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes as requested
Use auto-reconnect and multiplex utilities from https://github.com/blockworks-foundation/geyser-grpc-connector to allow a second gRPC connection.
Configuration
Up to 4 connections can be configured from config.json with overrides from ENV:
env variables: