-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add DSN client to subspace-gateway binary #3137
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
That makes sense. Edit: It was easier just to implement the RPC client. |
Alright, that should work as expected. I'll go rebase the RPC PR now. |
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.
No blockers, just a few suggestions
impl RpcNodeClient { | ||
/// Create a new instance of [`NodeClient`]. | ||
pub async fn new(url: &str) -> Result<Self, JsonError> { | ||
let client = Arc::new(WsClientBuilder::default().build(url).await?); | ||
Ok(Self { client }) | ||
} | ||
} |
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.
This is fine for now, but it is a hack. I think we'll need a separate RPC for these purposes.
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.
Makes sense overall. I suggested adding a parameter to the DSN config.
/// Configuration for network stack | ||
#[derive(Debug, Parser)] | ||
pub(crate) struct NetworkArgs { | ||
/// WebSocket RPC URL of the Subspace node to connect to. |
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.
listen-on
is always helpful for local debugging as well as for setting up some cloud infrastructure. I'd add this parameter.
This PR adds a DSN client implementation to the
subspace-gateway
binary.Code contributor checklist: