lncli: Make output of lncli sane and readable

LIGHT-133, LIGHT-138 Make output of `lncli showrouting table` in
two different formats: table and json.
Instead of sending serialized routing table send list of channels.
This commit is contained in:
BitfuryLightning 2016-08-20 16:49:35 -04:00
parent d764493d25
commit b5f07ede46
5 changed files with 272 additions and 109 deletions

@ -13,6 +13,9 @@ import (
"github.com/roasbeef/btcd/wire"
"github.com/urfave/cli"
"golang.org/x/net/context"
"github.com/BitfuryLightning/tools/rt"
"github.com/BitfuryLightning/tools/rt/graph/prefix_tree"
"github.com/BitfuryLightning/tools/rt/graph"
)
// TODO(roasbeef): cli logic for supporting both positional and unix style
@ -525,6 +528,18 @@ func sendPaymentCommand(ctx *cli.Context) error {
var ShowRoutingTableCommand = cli.Command{
Name: "showroutingtable",
Description: "shows routing table for a node",
Usage: "showroutingtable [--table]",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "table",
Usage: "Show the routing table in table format. Print only a few first symbols of id",
},
cli.BoolFlag{
Name: "human",
Usage: "Simplify output to human readable form. Output lightning_id partially. Only work with --table option.",
},
},
Action: showRoutingTable,
}
@ -537,7 +552,114 @@ func showRoutingTable(ctx *cli.Context) error {
if err != nil {
return err
}
printRespJson(resp)
// TODO(mkl): maybe it is better to print output directly omitting
// conversion to RoutingTable. This part is not performance critical so
// I think it is ok because it enables code reuse
r := rt.NewRoutingTable()
for _, channel := range resp.Channels {
r.AddChannel(
graph.NewID(channel.Id1),
graph.NewID(channel.Id2),
graph.NewEdgeID(channel.EdgeID),
&rt.ChannelInfo{channel.Capacity, channel.Weight},
)
}
if err != nil {
fmt.Println("Can't unmarshall routing table")
return err
}
if ctx.Bool("table") {
printRTAsTable(r, ctx.Bool("human"))
} else {
printRTAsJSON(r)
}
return nil
}
// Prints routing table in human readable table format
func printRTAsTable(r *rt.RoutingTable, humanForm bool) {
// Minimum length of data part to which name can be shortened
var minLen int
var tmpl string
var lightningIdTree, edgeIdTree prefix_tree.PrefixTree
if humanForm {
tmpl = "%-10v %-10v %-10v %-10v %-10v\n"
minLen = 6
} else {
tmpl = "%-64v %-64v %-66v %-10v %-10v\n"
minLen = 100
}
fmt.Printf(tmpl, "ID1", "ID2", "EdgeID", "Capacity", "Weight")
channels := r.AllChannels()
if humanForm {
// Generate prefix tree for shortcuts
lightningIdTree = prefix_tree.NewPrefixTree()
for _, node := range r.Nodes() {
lightningIdTree.Add(hex.EncodeToString([]byte(node.String())))
}
edgeIdTree = prefix_tree.NewPrefixTree()
for _, channel := range channels {
edgeIdTree.Add(channel.EdgeID.String())
}
}
for _, channel := range channels {
var source, target, edgeId string
sourceHex := hex.EncodeToString([]byte(channel.Id1.String()))
targetHex := hex.EncodeToString([]byte(channel.Id2.String()))
edgeIdRaw := channel.EdgeID.String()
if humanForm {
source = getShortcut(lightningIdTree, sourceHex, minLen)
target = getShortcut(lightningIdTree, targetHex, minLen)
edgeId = getShortcut(edgeIdTree, edgeIdRaw, minLen)
} else {
source = sourceHex
target = targetHex
edgeId = edgeIdRaw
}
fmt.Printf(tmpl, source, target, edgeId, channel.Info.Cpt, channel.Info.Wgt)
}
}
func getShortcut(tree prefix_tree.PrefixTree, s string, minLen int) string {
s1, err := tree.Shortcut(s)
if err != nil || s == s1 {
return s
}
if len(s1) < minLen && minLen < len(s) {
s1 = s[:minLen]
}
shortcut := fmt.Sprintf("%v...", s1)
if len(shortcut) >= len(s) {
shortcut = s
}
return shortcut
}
func printRTAsJSON(r *rt.RoutingTable) {
type ChannelDesc struct {
ID1 string `json:"lightning_id1"`
ID2 string `json:"lightning_id2"`
EdgeId string `json:"edge_id"`
Capacity float64 `json:"capacity"`
Weight float64 `json:"weight"`
}
var channels struct {
Channels []ChannelDesc `json:"channels"`
}
channelsRaw := r.AllChannels()
channels.Channels = make([]ChannelDesc, 0, len(channelsRaw))
for _, channelRaw := range channelsRaw {
sourceHex := hex.EncodeToString([]byte(channelRaw.Id1.String()))
targetHex := hex.EncodeToString([]byte(channelRaw.Id2.String()))
channels.Channels = append(channels.Channels,
ChannelDesc{
ID1: sourceHex,
ID2: targetHex,
EdgeId: channelRaw.EdgeID.String(),
Weight: channelRaw.Info.Weight(),
Capacity: channelRaw.Info.Capacity(),
},
)
}
printRespJson(channels)
}

@ -40,6 +40,7 @@ It has these top-level messages:
PendingChannelResponse
WalletBalanceRequest
WalletBalanceResponse
RTChannel
ShowRoutingTableRequest
ShowRoutingTableResponse
*/
@ -798,22 +799,42 @@ func (m *WalletBalanceResponse) String() string { return proto.Compac
func (*WalletBalanceResponse) ProtoMessage() {}
func (*WalletBalanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
type RTChannel struct {
Id1 string `protobuf:"bytes,1,opt,name=id1" json:"id1,omitempty"`
Id2 string `protobuf:"bytes,2,opt,name=id2" json:"id2,omitempty"`
EdgeID string `protobuf:"bytes,3,opt,name=edgeID" json:"edgeID,omitempty"`
Capacity float64 `protobuf:"fixed64,4,opt,name=capacity" json:"capacity,omitempty"`
Weight float64 `protobuf:"fixed64,5,opt,name=weight" json:"weight,omitempty"`
}
func (m *RTChannel) Reset() { *m = RTChannel{} }
func (m *RTChannel) String() string { return proto.CompactTextString(m) }
func (*RTChannel) ProtoMessage() {}
func (*RTChannel) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
type ShowRoutingTableRequest struct {
}
func (m *ShowRoutingTableRequest) Reset() { *m = ShowRoutingTableRequest{} }
func (m *ShowRoutingTableRequest) String() string { return proto.CompactTextString(m) }
func (*ShowRoutingTableRequest) ProtoMessage() {}
func (*ShowRoutingTableRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
func (*ShowRoutingTableRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
type ShowRoutingTableResponse struct {
Rt string `protobuf:"bytes,1,opt,name=rt" json:"rt,omitempty"`
Channels []*RTChannel `protobuf:"bytes,1,rep,name=channels" json:"channels,omitempty"`
}
func (m *ShowRoutingTableResponse) Reset() { *m = ShowRoutingTableResponse{} }
func (m *ShowRoutingTableResponse) String() string { return proto.CompactTextString(m) }
func (*ShowRoutingTableResponse) ProtoMessage() {}
func (*ShowRoutingTableResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
func (*ShowRoutingTableResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
func (m *ShowRoutingTableResponse) GetChannels() []*RTChannel {
if m != nil {
return m.Channels
}
return nil
}
func init() {
proto.RegisterType((*SendRequest)(nil), "lnrpc.SendRequest")
@ -848,6 +869,7 @@ func init() {
proto.RegisterType((*PendingChannelResponse_PendingChannel)(nil), "lnrpc.PendingChannelResponse.PendingChannel")
proto.RegisterType((*WalletBalanceRequest)(nil), "lnrpc.WalletBalanceRequest")
proto.RegisterType((*WalletBalanceResponse)(nil), "lnrpc.WalletBalanceResponse")
proto.RegisterType((*RTChannel)(nil), "lnrpc.RTChannel")
proto.RegisterType((*ShowRoutingTableRequest)(nil), "lnrpc.ShowRoutingTableRequest")
proto.RegisterType((*ShowRoutingTableResponse)(nil), "lnrpc.ShowRoutingTableResponse")
proto.RegisterEnum("lnrpc.ChannelStatus", ChannelStatus_name, ChannelStatus_value)
@ -1379,99 +1401,102 @@ var _Lightning_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("rpc.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 1496 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x57, 0x5b, 0x6f, 0x13, 0xd7,
0x13, 0xc7, 0x77, 0x7b, 0x6c, 0x27, 0xf6, 0xc9, 0xcd, 0x31, 0xf0, 0xff, 0xd3, 0x15, 0xa0, 0x08,
0x85, 0x40, 0x4d, 0x1f, 0x10, 0xa8, 0x54, 0xc1, 0xa4, 0x84, 0x92, 0x26, 0x29, 0x0e, 0x42, 0x7d,
0x5a, 0xad, 0xd7, 0x27, 0x78, 0xc5, 0x7a, 0x77, 0xeb, 0x73, 0x36, 0xc1, 0xfd,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0x16, 0xa7, 0xac, 0x53, 0xc5, 0x8b, 0x45, 0xe3, 0x8f, 0x1c,
0x14, 0x05, 0x70, 0x62, 0x24, 0xdd, 0x08, 0xdb, 0x45, 0x2a, 0x31, 0x18, 0x45, 0x12, 0xa5, 0x78,
0xf1, 0x0a, 0x52, 0x03, 0x01, 0x1d, 0xce, 0xd0, 0x9e, 0x20, 0x05, 0x2e, 0x13, 0x28, 0x2e, 0x64,
0x53, 0x6a, 0x5f, 0xc8, 0xe0, 0x8b, 0x22, 0x7b, 0x66, 0x71, 0xa5, 0xa5, 0x62, 0xd6, 0x12, 0xa9,
0x53, 0x91, 0x12, 0x34, 0xee, 0x78, 0x43, 0x2c, 0xc8, 0x48, 0x46, 0x57, 0x25, 0x77, 0x11, 0x32,
0x85, 0x24, 0xeb, 0xd4, 0x64, 0x46, 0xeb, 0x3a, 0xa3, 0x44, 0x11, 0x0c, 0x22, 0x98, 0x83, 0xc9,
0x0e, 0x88, 0x3a, 0xdb, 0x78, 0x00, 0xed, 0x98, 0x4c, 0xb7, 0x45, 0x17, 0x4a, 0x22, 0x1f, 0xa6,
0x19, 0x21, 0xc2, 0x47, 0x28, 0x19, 0x2d, 0x58, 0x79, 0x49, 0xf9, 0x2b, 0xef, 0xdc, 0x8f, 0x4c,
0xfc, 0x8c, 0xd4, 0x32, 0x17, 0x69, 0x0b, 0xcb, 0x71, 0xea, 0x40, 0xcb, 0x19, 0x61, 0x6a, 0x58,
0x5b, 0x33, 0xc2, 0x47, 0x55, 0xfd, 0x06, 0xac, 0x0b, 0xd4, 0xa3, 0xea, 0xcc, 0xd3, 0x11, 0xe8,
0x35, 0xc9, 0x75, 0x58, 0x13, 0xa7, 0x96, 0xcc, 0x66, 0x71, 0x58, 0x94, 0x87, 0xd8, 0x5a, 0xea,
0xaa, 0x08, 0xb8, 0x24, 0x29, 0xf2, 0xad, 0x1c, 0x95, 0x73, 0x67, 0x3a, 0xb1, 0xb8, 0xe3, 0x7b,
0x6f, 0x65, 0x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x1d, 0x2d, 0x12, 0x99, 0x6f,
0x00, 0x64, 0x41, 0x6e, 0xc9, 0x3d, 0x61, 0x9e, 0x48, 0x76, 0x59, 0x78, 0x0c, 0x15, 0xfd, 0xfa,
0x93, 0x0d, 0xad, 0x94, 0x5c, 0x10, 0xba, 0x9b, 0x69, 0xb1, 0xbe, 0xd9, 0x87, 0x7a, 0x8c, 0x8c,
0xe7, 0xf1, 0x67, 0x09, 0x7a, 0x5e, 0x85, 0x34, 0xeb, 0x3d, 0xcc, 0x21, 0x07, 0x34, 0xe2, 0xcf,
0x22, 0x99, 0xa7, 0x9a, 0x7d, 0x2b, 0xe7, 0x49, 0x64, 0x1e, 0x35, 0xb4, 0x73, 0x0c, 0xab, 0x49,
0x0a, 0x40, 0x42, 0xbf, 0x82, 0x44, 0x94, 0xb1, 0x9b, 0x9f, 0xa4, 0x18, 0xf2, 0x44, 0xfd, 0x8b,
0x3c, 0x55, 0xff, 0x0f, 0x09, 0x89, 0x35, 0x42, 0x64, 0x61, 0x2d, 0x21, 0x53, 0xf7, 0x76, 0x72,
0x18, 0xcb, 0x00, 0xff, 0x01, 0xa5, 0xc6, 0x89, 0xfc, 0x2f, 0x52, 0x5e, 0x3e, 0x82, 0xdd, 0xff,
0x5f, 0x79, 0xae, 0x0c, 0x0f, 0xcb, 0xf2, 0x4f, 0xee, 0xa3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff,
0xfb, 0x5b, 0x5f, 0x9d, 0xf1, 0x0e, 0x00, 0x00,
// 1539 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x57, 0x5d, 0x6f, 0x1a, 0x57,
0x13, 0xce, 0x1a, 0x30, 0x30, 0x80, 0x0d, 0xc7, 0x5f, 0x98, 0x24, 0xef, 0x9b, 0xf7, 0x28, 0x89,
0xac, 0xc8, 0x71, 0x12, 0xf2, 0x5e, 0x44, 0x89, 0x9a, 0xca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5, 0xbf, 0xea, 0xa7, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x86, 0xfc, 0xda, 0xe9, 0x62,
0x0f, 0x00, 0x00,
}

@ -222,9 +222,17 @@ message WalletBalanceResponse {
double balance = 1;
}
message RTChannel {
string id1 = 1;
string id2 = 2;
string edgeID = 3;
double capacity = 4;
double weight = 5;
}
message ShowRoutingTableRequest {
}
message ShowRoutingTableResponse {
string rt = 1;
repeated RTChannel channels = 1;
}

@ -5,7 +5,6 @@
package lnwire
import (
"encoding/gob"
"fmt"
"io"
@ -18,16 +17,13 @@ type NeighborHelloMessage struct {
}
func (msg *NeighborHelloMessage) Decode(r io.Reader, pver uint32) error {
decoder := gob.NewDecoder(r)
rt1 := rt.NewRoutingTable()
err := decoder.Decode(rt1.G)
rt1, err := rt.UnmarshallRoutingTable(r)
msg.RT = rt1
return err
}
func (msg *NeighborHelloMessage) Encode(w io.Writer, pver uint32) error {
encoder := gob.NewEncoder(w)
err := encoder.Encode(msg.RT.G)
err := msg.RT.Marshall(w)
return err
}

@ -512,7 +512,19 @@ func (r *rpcServer) ShowRoutingTable(ctx context.Context,
in *lnrpc.ShowRoutingTableRequest) (*lnrpc.ShowRoutingTableResponse, error) {
rpcsLog.Debugf("[ShowRoutingTable]")
rtCopy := r.server.routingMgr.GetRTCopy()
channels := make([]*lnrpc.RTChannel, 0)
for _, channel := range rtCopy.AllChannels() {
channels = append(channels,
&lnrpc.RTChannel{
Id1: channel.Id1.String(),
Id2: channel.Id2.String(),
EdgeID: channel.EdgeID.String(),
Capacity: channel.Info.Capacity(),
Weight: channel.Info.Weight(),
},
)
}
return &lnrpc.ShowRoutingTableResponse{
Rt: rtCopy.String(),
Channels: channels,
}, nil
}