Closed blckbx closed 10 months ago
The change does not what it's supposed to do.
And I don't know why. peer_alias
is relatively new in ListChannel
api call, could it be some proto type of thing?
I tested the gRPC endpoint on v0.17 and I also do not see the peer_alias being reported back as expected. No issues getting the alias from the GetNodeInfo endpoint.
I tested the gRPC endpoint on v0.17 and I also do not see the peer_alias being reported back as expected. No issues getting the alias from the GetNodeInfo endpoint.
https://lightning.engineering/api-docs/api/lnd/lightning/list-channels#lnrpclistchannelsrequest A special flag is required for the peer alias lookup, it's disabled by default to speed up the call. And I don't think we want this to run every 20sec.
$ curl --insecure \
--header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 .lnd/data/chain/bitcoin/mainnet/readonly.macaroon)" \
https://localhost:8080/v1/channels?peer_alias_lookup=true | jq -r '.channels[].peer_alias'
this would be the correct grpc call. we could do a daily one updating peers' aliases.
Timing (~40 chans):
peer_alias_lookup=true
: real 0m4,909s
peer_alias_lookup=false
: real 0m3,802s
This experimental PR tries to update alias on every
jobs.py
run by using data that has been already fetched byListChannels(ln.ListChannelsRequest()).channels
.It's rather hard to test given that peers need to change their alias to see the effect happening in realtime.