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

REST: increase max msg size for REST proxy #3379

Merged
merged 1 commit into from Aug 8, 2019

Conversation

@Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Aug 7, 2019

Some time ago, we modified lncli to accept larger responses from the
server, up to 50MB. However, we failed to update the REST proxy, which
is in a sense, a client to the regular RPC server. As a result, users
can't currently hit the /v1/graph endpoint, as it'll fail with an
error.

In this PR, we update the proxy's dial options to allow it to receive
larger responses from the actual gRPC server. This is only a temporary
measure however, as we'll eventually want to expose some sort of
pagination for the end client.

@wpaulino wpaulino added this to the 0.8.0 milestone Aug 7, 2019
Some time ago, we modified `lncli` to accept larger responses from the
server, up to 50MB. However, we failed to update the REST proxy, which
is in a sense, a client to the regular RPC server. As a result, users
can't currently hit the `/v1/graph` endpoint, as it'll fail with an
error.

In this PR, we update the proxy's dial options to allow it to receive
larger responses from the actual gRPC server. This is only a temporary
measure however, as we'll eventually want to expose some sort of
pagination for the end client.
@Roasbeef Roasbeef force-pushed the rest-describe-graph branch from a3e676c to 764099c Aug 7, 2019
Copy link
Collaborator

@wpaulino wpaulino left a comment

LGTM 🏯

restDialOpts := []grpc.DialOption{
grpc.WithTransportCredentials(*restCreds),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 50),
Copy link
Collaborator

@wpaulino wpaulino Aug 7, 2019

Choose a reason for hiding this comment

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

Nit: since it's also defined in cmd/lncli, we could extract the const here and import it there.

@Roasbeef Roasbeef merged commit 3e1b2c5 into lightningnetwork:master Aug 8, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants