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

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 Roasbeef:rest-describe-graph branch from a3e676c to 764099c Aug 7, 2019
Copy link
Collaborator

left a comment

LGTM 🏯

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

This comment has been minimized.

Copy link
@wpaulino

wpaulino Aug 7, 2019

Collaborator

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
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 60.793%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.