lightninglabs / pool

Lightning Pool: a non-custodial batched uniform clearing-price auction for Lightning Channel Leases (LCL). An LCL packages up inbound channel liquidity (ability to receive funds) as a fixed income asset with a maturity date expressed in blocks.
MIT License
255 stars 47 forks source link

poold: Unable to Parse Batch #95

Closed ryanthegentry closed 4 years ago

ryanthegentry commented 4 years ago

I believe that my non-Tor poold instance is crashing when attempting to match with a Tor node. Here are the logs:

2020-09-25 16:36:22.613 [TRC] AUCT: Received msg=&poolrpc.ServerAuctionMessage{Msg:(*poolrpc.ServerAuctionMessage_Prepare)(0xc000010048), XXX_NoUnkeyedLiteral:struct {}{}, XXX_unrecognized:[]uint8(nil), XXX_sizecache:0}, err=<nil> from server
2020-09-25 16:36:22.613 [DBG] RPCS: Received message from the server: prepare:<matched_orders:<key:"517fb7836fdf273627b08432e6dfe3e31b40eb8eec357c7b898b4956a94bbeaf" value:<matched_asks:<ask:<details:<trader_key:"\003\000\325\337 \177N\305K\242\n\037\017\325\347]\020\321g{\260\226\232}\246sl\370gMb\263R" rate_fixed:1157 amt:100000 order_nonce:"Ki\034\020wa\302\333_\252\324\243VW&h/\027\374\316\330Mm\024\323\276\237G\317\266\3055" order_sig:"0D\002 v\376T\017]\000\364(f\223z\375\"K*\321^\247\216\222\377\323\257\254\315\014\321}<\302\203\317\002 x\333\034\025\311x\037\024x/>}\2052\360\264\375\302\261\313#\356\333>\026If\006\3634\300N" multi_sig_key:"\002\302\336aa6s\204Z\334\032\264\226R\370\020r?o\001Wx\351d\367\022\321\305\242\234l\215\004" node_pub:"\003\346\221\370\037\010\305o\250v\314N\365\311\350\267'\275h,\363V\005\276%\324\206\007\250\002R`S" node_addr:<network:"tcp" addr:"ug6wkjdnp5fq2iiyakjn7uewn2eyghpqyapzkgvh7hbsq6acmxtt6lqd.onion:9735" > max_batch_fee_rate_sat_per_kw:22500 > max_duration_blocks:4320 > units_filled:1 > > > clearing_price_rate:2976 charged_accounts:<ending_balance:17832660 outpoint_index:2 trader_key:"\002\235\360ik^\010\262\245\2656\200+\361\346\276\375e\327\277i\223\332\007\223\353\"\003/\261_\325:" > execution_fee:<base_fee:1 fee_rate:1000 > batch_transaction:"\002\000\000\000\003\367\205\np\352Q\267H\253E_\264IQ\256HJ\334k\313\006\261\336\231T\367\260\3070?\351*\002\000\000\000\000\000\000\000\000:tt\305\034\361\374\362V\347'\306\274\315FMU\317\375\340\343{\263\033&\367\227\253\351P\3473\001\000\000\000\000\000\000\000\000r\300S\372\"\027u\004\340\023i\207\277\327\214\306p\214\3045\337\022^!\005\214\306\337!\220\362\207\006\000\000\000\000\000\000\000\000\004\240\206\001\000\000\000\000\000\"\000 \331\225\246#\211\243\371y\370[ \003\354\212\357\255j/P\035(\217\014,\330\356\337M\267\323cx\350\346\016\000\000\000\000\000\"\000 X3\370\236\361=9\210\344@[\231\351d\014\351\320\312\274R\226kw\271/\255\021n\302@n\376\324\032\020\001\000\000\000\000\"\000 \024q\177\315\216\030hJ\016\361\343\224:-A\000\342~\207\203\300\302\305\362fR\201\302\364R}\240t\036\310\001\000\000\000\000\"\000 \265d\262\302\222\265\0231\214\316\354\272\024/\2232\236\010S\350\246\276\321\225\211`\3618O\244v\203\000\000\000\000" fee_rate_sat_per_kw:12690 batch_id:"\003\312\274\204\271P\233\002`\224\337\311\307O\226&\226\276\246\271'\014Zu\017\326\303\237\250@\353\316\211" > 
2020-09-25 16:36:22.614 [TRC] RPCS: Received prepare msg from server, batch_id=03cabc84b9509b026094dfc9c74f962696bea6b9270c5a750fd6c39fa840ebce89: (*poolrpc.ServerAuctionMessage_Prepare)(0xc000010048)({
 Prepare: (*poolrpc.OrderMatchPrepare)(0xc00001d720)(matched_orders:<key:"517fb7836fdf273627b08432e6dfe3e31b40eb8eec357c7b898b4956a94bbeaf" value:<matched_asks:<ask:<details:<trader_key:"\003\000\325\337 \177N\305K\242\n\037\017\325\347]\020\321g{\260\226\232}\246sl\370gMb\263R" rate_fixed:1157 amt:100000 order_nonce:"Ki\034\020wa\302\333_\252\324\243VW&h/\027\374\316\330Mm\024\323\276\237G\317\266\3055" order_sig:"0D\002 v\376T\017]\000\364(f\223z\375\"K*\321^\247\216\222\377\323\257\254\315\014\321}<\302\203\317\002 x\333\034\025\311x\037\024x/>}\2052\360\264\375\302\261\313#\356\333>\026If\006\3634\300N" multi_sig_key:"\002\302\336aa6s\204Z\334\032\264\226R\370\020r?o\001Wx\351d\367\022\321\305\242\234l\215\004" node_pub:"\003\346\221\370\037\010\305o\250v\314N\365\311\350\267'\275h,\363V\005\276%\324\206\007\250\002R`S" node_addr:<network:"tcp" addr:"ug6wkjdnp5fq2iiyakjn7uewn2eyghpqyapzkgvh7hbsq6acmxtt6lqd.onion:9735" > max_batch_fee_rate_sat_per_kw:22500 > max_duration_blocks:4320 > units_filled:1 > > > clearing_price_rate:2976 charged_accounts:<ending_balance:17832660 outpoint_index:2 trader_key:"\002\235\360ik^\010\262\245\2656\200+\361\346\276\375e\327\277i\223\332\007\223\353\"\003/\261_\325:" > execution_fee:<base_fee:1 fee_rate:1000 > batch_transaction:"\002\000\000\000\003\367\205\np\352Q\267H\253E_\264IQ\256HJ\334k\313\006\261\336\231T\367\260\3070?\351*\002\000\000\000\000\000\000\000\000:tt\305\034\361\374\362V\347'\306\274\315FMU\317\375\340\343{\263\033&\367\227\253\351P\3473\001\000\000\000\000\000\000\000\000r\300S\372\"\027u\004\340\023i\207\277\327\214\306p\214\3045\337\022^!\005\214\306\337!\220\362\207\006\000\000\000\000\000\000\000\000\004\240\206\001\000\000\000\000\000\"\000 \331\225\246#\211\243\371y\370[ \003\354\212\357\255j/P\035(\217\014,\330\356\337M\267\323cx\350\346\016\000\000\000\000\000\"\000 X3\370\236\361=9\210\344@[\231\351d\014\351\320\312\274R\226kw\271/\255\021n\302@n\376\324\032\020\001\000\000\000\000\"\000 \024q\177\315\216\030hJ\016\361\343\224:-A\000\342~\207\203\300\302\305\362fR\201\302\364R}\240t\036\310\001\000\000\000\000\"\000 \265d\262\302\222\265\0231\214\316\354\272\024/\2232\236\010S\350\246\276\321\225\211`\3618O\244v\203\000\000\000\000" fee_rate_sat_per_kw:12690 batch_id:"\003\312\274\204\271P\233\002`\224\337\311\307O\226&\226\276\246\271'\014Zu\017\326\303\237\250@\353\316\211" )
})

2020-09-25 16:36:22.619 [ERR] LLMD: unable to parse batch: %v error parsing matched order: error parsing server ask: unable to parse node addr: lookup ug6wkjdnp5fq2iiyakjn7uewn2eyghpqyapzkgvh7hbsq6acmxtt6lqd.onion: no such host
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xd4b8ca]

goroutine 57 [running]:
github.com/lightninglabs/pool/order.(*Batch).CancelPendingFundingShims(0x0, 0x13cd160, 0xc000010208, 0xc0007f3c60, 0x0, 0x0)
    /home/ubuntu/go/src/github.com/lightninglabs/pool/order/batch.go:195 +0x3a
github.com/lightninglabs/pool.(*rpcServer).sendRejectBatch(0xc00014e3f0, 0x0, 0x13943a0, 0xc000042970, 0x2, 0x2)
    /home/ubuntu/go/src/github.com/lightninglabs/pool/rpcserver.go:1305 +0x8c
github.com/lightninglabs/pool.(*rpcServer).handleServerMessage(0xc00014e3f0, 0xc0006b66c0, 0x24, 0xc00064e070)
    /home/ubuntu/go/src/github.com/lightninglabs/pool/rpcserver.go:371 +0x8f5
github.com/lightninglabs/pool.(*rpcServer).serverHandler(0xc00014e3f0, 0xc0002ba4e0, 0xc00007a4e0)
    /home/ubuntu/go/src/github.com/lightninglabs/pool/rpcserver.go:300 +0x261
created by github.com/lightninglabs/pool.(*rpcServer).Start
    /home/ubuntu/go/src/github.com/lightninglabs/pool/rpcserver.go:207 +0x9ab

and my lnd.conf

[Application Options]
# Allow push payments
accept-keysend=1

# Public network name
alias=tehGentry

# Allow gift routes
allow-circular-route=1

# Public hex color
color=#00c300

# Log levels
debuglevel=CNCT=debug,HSWC=debug

# Public P2P IP
externalip=52.15.160.165

# Set the maximum amount of commit fees in a channel
max-channel-fee-allocation=1.0

# Set the max timeout blocks of a payment
max-cltv-expiry=5000

# Pending channel limit
maxpendingchannels=10

# Min inbound channel limit
minchansize=100000

# gRPC socket binding
rpclisten=0.0.0.0:10009

# REST socket binding
restlisten=0.0.0.0:8080

# Avoid slow startup time
sync-freelist=1

# Avoid high startup overhead
stagger-initial-reconnect=1

# TLS certificate IP
tlsextraip=52.15.160.165

[Bitcoin]
# Turn on Bitcoin mode
bitcoin.active=1

# Set the channel confs to wait for channels
bitcoin.defaultchanconfs=2

# Forward fee rate in parts per million
bitcoin.feerate=1000

# Set bitcoin.testnet=1 or bitcoin.mainnet=1 as appropriate
bitcoin.mainnet=1

# Set the lower bound for HTLCs
bitcoin.minhtlc=1

# Set backing node, bitcoin.node=neutrino or bitcoin.node=bitcoind
bitcoin.node=bitcoind

[bitcoind]
# Set the password to what the auth script said
bitcoind.rpcpass=bvf0_3yzmdRHzHwtGkOoKeo5CsIBnqjq0GHxeOxe2_Q=

# Set the username
bitcoind.rpcuser=bitcoinrpc

# Set the ZMQ listeners
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

[protocol]
# Enable large channels support
protocol.wumbo-channels=1

[routerrpc]
# Make sure that LND is the binary release or built with the routerrpc tag

# Set default chance of a hop success
routerrpc.apriorihopprob=0.5

# Start to ignore nodes if they return many failures (set to 1 to turn off)
routerrpc.aprioriweight=0.75

# Set minimum desired savings of trying a cheaper path
routerrpc.attemptcost=10

# Set the number of historical routing records
routerrpc.maxmchistory=10000

# Set the min confidence in a path worth trying
routerrpc.minrtprob=0.005

# Set the time to forget past routing failures
routerrpc.penaltyhalflife=6h0m0s

[routing]
# Set validation of channels off: only if using Neutrino
#routing.assumechanvalid=1

[tor]
# Enable Tor if using
#tor.active=1
#tor.v3=1
ryanthegentry commented 4 years ago

nvm was still on v0.2.2, believe this was fixed in #87