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

cmd/lncli: increase lightning gRPC block size to 50MB #2374

Merged
merged 1 commit into from Dec 28, 2018

Conversation

Projects
None yet
7 participants
@Roasbeef
Copy link
Member

Roasbeef commented Dec 25, 2018

In this commit, we increase the gRPC block size from 4MB to 50MB.
Recently, the output of lncli describegraph has hit the block size cap
due to the expansion of the mainnet graph. Without this attempts to
fetch the graph return an error of:

[lncli] rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4246753 vs. 4194304)

With this commit, we give ourselves some breathing room. It's important
to note that the max message size limit is a client side setting. As a
result, any developers driving lnd with gRPC will also need to raise
their block size limit as well if they wish to fetch the graph over
gRPC.

cmd/lncli: increase lightning gRPC block size to 50MB
In this commit, we increase the gRPC block size from 4MB to 50MB.
Recently, the output of `lncli describegraph` has hit the block size cap
due to the expansion of the mainnet graph. Without this attempts to
fetch the graph returns an error of:
```
[lncli] rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4246753 vs. 4194304)
```

With this commit, we give ourselves some breathing room. It's important
to note that the max message size limit is a _client side_ setting. As a
result, any developers driving `lnd` with gRPC will also need to raise
their block size limit as well if they wish to fetch the graph over
gRPC.

@Roasbeef Roasbeef force-pushed the Roasbeef:increase-lightning-block-size branch from 89d31da to 0453078 Dec 25, 2018

@C-Otto C-Otto referenced this pull request Dec 25, 2018

Closed

Deal with message limits #11

@guggero

This comment has been minimized.

Copy link
Contributor

guggero commented Dec 26, 2018

Nice! While we're increasing the block size, we should also re-enable some deprecated features and then call it gRPC Cash!
It's Poon/Dryja's original vision :-D

@nickfogle

This comment has been minimized.

Copy link

nickfogle commented Dec 26, 2018

@Roasbeef this fixes the issue for me. I also had to update my client side grpc.max_receive_message_length setting as you mentioned above.

@Roasbeef Roasbeef merged commit c0087e8 into lightningnetwork:master Dec 28, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 55.918%
Details
@ekerstein

This comment has been minimized.

Copy link

ekerstein commented Jan 1, 2019

Following what @nickfogle said, I used these Python options to fix the gRPC example for describegraph in the API docs: https://api.lightning.community/#describegraph

channel = grpc.secure_channel('localhost:10009', ssl_creds, options=[('grpc.max_receive_message_length',1024*1024*50)])

@hpbock

This comment has been minimized.

Copy link

hpbock commented Jan 1, 2019

This is the option to fix this issue for node.js clients:
const lightning = new lnrpc.Lightning('localhost:10009', creds, {'grpc.max_receive_message_length': 50*1024*1024});

hpbock added a commit to hpbock/lndChannelOverview that referenced this pull request Jan 1, 2019

@C-Otto

This comment has been minimized.

Copy link

C-Otto commented Jan 3, 2019

The description of ForwardingHistory still references the old limit and needs to be updated

@misovan

This comment has been minimized.

Copy link

misovan commented Jan 10, 2019

I tested the PR and I got it working only after extending both lncli client and lnd server options in lnd.go. On server side the required option is MaxSendMsgSize(m int). Thus this commit covers only client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment