Skip to content

Commit 160d7f3

Browse files
authored
Merge pull request #178 from lightninglabs/grpc-max-receive-size
accounting: increase client gRPC max receive size, bump lndclient to fix large message issue
2 parents dfa3fcb + bb86712 commit 160d7f3

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ type LndConfig struct {
106106

107107
// TLSCertPath is the path to the tls cert that faraday should use.
108108
TLSCertPath string `long:"tlscertpath" description:"Path to TLS cert"`
109+
110+
// RequestTimeout is the maximum time to wait for a response from lnd.
111+
RequestTimeout time.Duration `long:"requesttimeout" description:"The maximum time to wait for a response from lnd, if not set the default of 30 seconds will be used."`
109112
}
110113

111114
type Config struct { //nolint:maligned

faraday.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func Main() error {
7676
CustomMacaroonPath: config.Lnd.MacaroonPath,
7777
TLSPath: config.Lnd.TLSCertPath,
7878
CheckVersion: MinLndVersion,
79+
RPCTimeout: config.Lnd.RequestTimeout,
7980
})
8081
if err != nil {
8182
return fmt.Errorf("cannot connect to lightning services: %v",

frdrpcserver/rpcserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ var (
5656
)
5757

5858
// maxMsgRecvSize is the largest message our REST proxy will receive. We
59-
// set this to 200MiB atm.
60-
maxMsgRecvSize = grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 200)
59+
// set this to 400MiB atm.
60+
maxMsgRecvSize = grpc.MaxCallRecvMsgSize(400 * 1024 * 1024)
6161

6262
// maxInvoiceQueries is the maximum number of invoices we request from
6363
// lnd at a time.

go.mod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ require (
77
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
88
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
99
github.com/jessevdk/go-flags v1.4.0
10-
github.com/lightninglabs/lndclient v0.17.0-1
11-
github.com/lightningnetwork/lnd v0.17.0-beta
10+
github.com/lightninglabs/lndclient v0.17.0-5
11+
github.com/lightningnetwork/lnd v0.17.1-beta
1212
github.com/lightningnetwork/lnd/cert v1.2.2
1313
github.com/lightningnetwork/lnd/kvdb v1.4.4
1414
github.com/shopspring/decimal v1.2.0
@@ -27,7 +27,7 @@ require (
2727
github.com/beorn7/perks v1.0.1 // indirect
2828
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
2929
github.com/btcsuite/btcd/btcutil/psbt v1.1.8 // indirect
30-
github.com/btcsuite/btcwallet v0.16.10-0.20230804184612-07be54bc22cf // indirect
30+
github.com/btcsuite/btcwallet v0.16.10-0.20231017144732-e3ff37491e9c // indirect
3131
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 // indirect
3232
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 // indirect
3333
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 // indirect
@@ -141,7 +141,6 @@ require (
141141
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 // indirect
142142
golang.org/x/mod v0.10.0 // indirect
143143
golang.org/x/net v0.17.0 // indirect
144-
golang.org/x/sync v0.3.0 // indirect
145144
golang.org/x/sys v0.15.0 // indirect
146145
golang.org/x/term v0.15.0 // indirect
147146
golang.org/x/text v0.14.0 // indirect

go.sum

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtyd
8282
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
8383
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
8484
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
85-
github.com/btcsuite/btcwallet v0.16.10-0.20230804184612-07be54bc22cf h1:iZrvu/dynDPUcLJFkKiN9wnS4EdjwZSJS1H33Rx/a1Y=
86-
github.com/btcsuite/btcwallet v0.16.10-0.20230804184612-07be54bc22cf/go.mod h1:qUPTONX2GVX7ERHvgh352/WySsfYlrkL4729qX9o9cA=
85+
github.com/btcsuite/btcwallet v0.16.10-0.20231017144732-e3ff37491e9c h1:+7tbYEUj0TYYIvuvE9YP+x5dU3FT/8J6Qh8d5YvQwrE=
86+
github.com/btcsuite/btcwallet v0.16.10-0.20231017144732-e3ff37491e9c/go.mod h1:WSKhOJWUmUOHKCKEzdt+jWAHFAE/t4RqVbCwL2pEdiU=
8787
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 h1:etuLgGEojecsDOYTII8rYiGHjGyV5xTqsXi+ZQ715UU=
8888
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2/go.mod h1:Zpk/LOb2sKqwP2lmHjaZT9AdaKsHPSbNLm2Uql5IQ/0=
8989
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 h1:BtEN5Empw62/RVnZ0VcJaVtVlBijnLlJY+dwjAye2Bg=
@@ -385,8 +385,8 @@ github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg=
385385
github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
386386
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
387387
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
388-
github.com/lightninglabs/lndclient v0.17.0-1 h1:r/25L1P86Wjdj0UmqfMNF3Ph+SJOTeGKlOIjkX3iWiw=
389-
github.com/lightninglabs/lndclient v0.17.0-1/go.mod h1:J2RD7ZcIVreQKy6NTOGJMM7AeGvsMLHO+Aoegkzpijs=
388+
github.com/lightninglabs/lndclient v0.17.0-5 h1:Vb/Qu4IhrRvj55uwugx4O5f1L8TEXrqSOvEVWaGRgfg=
389+
github.com/lightninglabs/lndclient v0.17.0-5/go.mod h1:9Lfhm/cU505Q2Rne5okgPehgXOXaeonYpdTYZ3sr3Eg=
390390
github.com/lightninglabs/neutrino v0.16.0 h1:YNTQG32fPR/Zg0vvJVI65OBH8l3U18LSXXtX91hx0q0=
391391
github.com/lightninglabs/neutrino v0.16.0/go.mod h1:x3OmY2wsA18+Kc3TSV2QpSUewOCiscw2mKpXgZv2kZk=
392392
github.com/lightninglabs/neutrino/cache v1.1.1 h1:TllWOSlkABhpgbWJfzsrdUaDH2fBy/54VSIB4vVqV8M=
@@ -395,8 +395,8 @@ github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wl
395395
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
396396
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f h1:Pua7+5TcFEJXIIZ1I2YAUapmbcttmLj4TTi786bIi3s=
397397
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
398-
github.com/lightningnetwork/lnd v0.17.0-beta h1:Vzl2W3ClIDdffuQD5IaZwyP7CKR/CbXxWqws72Cq51g=
399-
github.com/lightningnetwork/lnd v0.17.0-beta/go.mod h1:8w27nArqZ1P7U6FP9U78GlaTLNm7u9GhV5Edv1C1yRU=
398+
github.com/lightningnetwork/lnd v0.17.1-beta h1:ya5pXahwrEJ9Sj9TQu0rIsOr1dMK8myuFMslZlmVmhA=
399+
github.com/lightningnetwork/lnd v0.17.1-beta/go.mod h1:wgnCM0tlwxUDZ9y7CeBkXtBJkaY45+R8A3XAgsFS0MA=
400400
github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI=
401401
github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U=
402402
github.com/lightningnetwork/lnd/clock v1.0.1/go.mod h1:KnQudQ6w0IAMZi1SgvecLZQZ43ra2vpDNj7H/aasemg=
@@ -726,7 +726,6 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
726726
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
727727
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
728728
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
729-
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
730729
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
731730
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
732731
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

0 commit comments

Comments
 (0)