From f7982f0f4c4bf6766b721f5cf07b1e3e3c91599e Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 10 May 2019 10:38:31 +0200 Subject: [PATCH] routing+routerrpc: expose mission control state over rpc This commit exposes mission control state for rpc for development purposes. --- lnrpc/routerrpc/router.pb.go | 423 +++++++++++++++++++++++++------ lnrpc/routerrpc/router.proto | 43 ++++ lnrpc/routerrpc/router_server.go | 47 ++++ routing/missioncontrol.go | 94 +++++++ routing/missioncontrol_test.go | 10 + 5 files changed, 536 insertions(+), 81 deletions(-) diff --git a/lnrpc/routerrpc/router.pb.go b/lnrpc/routerrpc/router.pb.go index 0476353b0..63c436446 100644 --- a/lnrpc/routerrpc/router.pb.go +++ b/lnrpc/routerrpc/router.pb.go @@ -799,6 +799,213 @@ func (m *ResetMissionControlResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ResetMissionControlResponse proto.InternalMessageInfo +type QueryMissionControlRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryMissionControlRequest) Reset() { *m = QueryMissionControlRequest{} } +func (m *QueryMissionControlRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMissionControlRequest) ProtoMessage() {} +func (*QueryMissionControlRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{10} +} + +func (m *QueryMissionControlRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryMissionControlRequest.Unmarshal(m, b) +} +func (m *QueryMissionControlRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryMissionControlRequest.Marshal(b, m, deterministic) +} +func (m *QueryMissionControlRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMissionControlRequest.Merge(m, src) +} +func (m *QueryMissionControlRequest) XXX_Size() int { + return xxx_messageInfo_QueryMissionControlRequest.Size(m) +} +func (m *QueryMissionControlRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMissionControlRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMissionControlRequest proto.InternalMessageInfo + +/// QueryMissionControlResponse contains mission control state per node. +type QueryMissionControlResponse struct { + Nodes []*NodeHistory `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QueryMissionControlResponse) Reset() { *m = QueryMissionControlResponse{} } +func (m *QueryMissionControlResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMissionControlResponse) ProtoMessage() {} +func (*QueryMissionControlResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{11} +} + +func (m *QueryMissionControlResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryMissionControlResponse.Unmarshal(m, b) +} +func (m *QueryMissionControlResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryMissionControlResponse.Marshal(b, m, deterministic) +} +func (m *QueryMissionControlResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMissionControlResponse.Merge(m, src) +} +func (m *QueryMissionControlResponse) XXX_Size() int { + return xxx_messageInfo_QueryMissionControlResponse.Size(m) +} +func (m *QueryMissionControlResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMissionControlResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMissionControlResponse proto.InternalMessageInfo + +func (m *QueryMissionControlResponse) GetNodes() []*NodeHistory { + if m != nil { + return m.Nodes + } + return nil +} + +/// NodeHistory contains the mission control state for a particular node. +type NodeHistory struct { + /// Node pubkey + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + /// Time stamp of last failure. Set to zero if no failure happened yet. + LastFailTime int64 `protobuf:"varint,2,opt,name=last_fail_time,proto3" json:"last_fail_time,omitempty"` + /// Estimation of success probability for channels not in the channel array. + OtherChanSuccessProb float32 `protobuf:"fixed32,3,opt,name=other_chan_success_prob,proto3" json:"other_chan_success_prob,omitempty"` + /// Historical information of particular channels. + Channels []*ChannelHistory `protobuf:"bytes,4,rep,name=channels,proto3" json:"channels,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeHistory) Reset() { *m = NodeHistory{} } +func (m *NodeHistory) String() string { return proto.CompactTextString(m) } +func (*NodeHistory) ProtoMessage() {} +func (*NodeHistory) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{12} +} + +func (m *NodeHistory) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NodeHistory.Unmarshal(m, b) +} +func (m *NodeHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NodeHistory.Marshal(b, m, deterministic) +} +func (m *NodeHistory) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeHistory.Merge(m, src) +} +func (m *NodeHistory) XXX_Size() int { + return xxx_messageInfo_NodeHistory.Size(m) +} +func (m *NodeHistory) XXX_DiscardUnknown() { + xxx_messageInfo_NodeHistory.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeHistory proto.InternalMessageInfo + +func (m *NodeHistory) GetPubkey() []byte { + if m != nil { + return m.Pubkey + } + return nil +} + +func (m *NodeHistory) GetLastFailTime() int64 { + if m != nil { + return m.LastFailTime + } + return 0 +} + +func (m *NodeHistory) GetOtherChanSuccessProb() float32 { + if m != nil { + return m.OtherChanSuccessProb + } + return 0 +} + +func (m *NodeHistory) GetChannels() []*ChannelHistory { + if m != nil { + return m.Channels + } + return nil +} + +/// NodeHistory contains the mission control state for a particular channel. +type ChannelHistory struct { + /// Short channel id + ChannelId uint64 `protobuf:"varint,1,opt,name=channel_id,proto3" json:"channel_id,omitempty"` + /// Time stamp of last failure. + LastFailTime int64 `protobuf:"varint,2,opt,name=last_fail_time,proto3" json:"last_fail_time,omitempty"` + /// Minimum penalization amount. + MinPenalizeAmtSat int64 `protobuf:"varint,3,opt,name=min_penalize_amt_sat,proto3" json:"min_penalize_amt_sat,omitempty"` + /// Estimation of success probability for this channel. + SuccessProb float32 `protobuf:"fixed32,4,opt,name=success_prob,proto3" json:"success_prob,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChannelHistory) Reset() { *m = ChannelHistory{} } +func (m *ChannelHistory) String() string { return proto.CompactTextString(m) } +func (*ChannelHistory) ProtoMessage() {} +func (*ChannelHistory) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{13} +} + +func (m *ChannelHistory) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ChannelHistory.Unmarshal(m, b) +} +func (m *ChannelHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ChannelHistory.Marshal(b, m, deterministic) +} +func (m *ChannelHistory) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChannelHistory.Merge(m, src) +} +func (m *ChannelHistory) XXX_Size() int { + return xxx_messageInfo_ChannelHistory.Size(m) +} +func (m *ChannelHistory) XXX_DiscardUnknown() { + xxx_messageInfo_ChannelHistory.DiscardUnknown(m) +} + +var xxx_messageInfo_ChannelHistory proto.InternalMessageInfo + +func (m *ChannelHistory) GetChannelId() uint64 { + if m != nil { + return m.ChannelId + } + return 0 +} + +func (m *ChannelHistory) GetLastFailTime() int64 { + if m != nil { + return m.LastFailTime + } + return 0 +} + +func (m *ChannelHistory) GetMinPenalizeAmtSat() int64 { + if m != nil { + return m.MinPenalizeAmtSat + } + return 0 +} + +func (m *ChannelHistory) GetSuccessProb() float32 { + if m != nil { + return m.SuccessProb + } + return 0 +} + func init() { proto.RegisterEnum("routerrpc.Failure_FailureCode", Failure_FailureCode_name, Failure_FailureCode_value) proto.RegisterType((*PaymentRequest)(nil), "routerrpc.PaymentRequest") @@ -811,92 +1018,107 @@ func init() { proto.RegisterType((*ChannelUpdate)(nil), "routerrpc.ChannelUpdate") proto.RegisterType((*ResetMissionControlRequest)(nil), "routerrpc.ResetMissionControlRequest") proto.RegisterType((*ResetMissionControlResponse)(nil), "routerrpc.ResetMissionControlResponse") + proto.RegisterType((*QueryMissionControlRequest)(nil), "routerrpc.QueryMissionControlRequest") + proto.RegisterType((*QueryMissionControlResponse)(nil), "routerrpc.QueryMissionControlResponse") + proto.RegisterType((*NodeHistory)(nil), "routerrpc.NodeHistory") + proto.RegisterType((*ChannelHistory)(nil), "routerrpc.ChannelHistory") } func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) } var fileDescriptor_7a0613f69d37b0a5 = []byte{ - // 1271 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x56, 0xdd, 0x72, 0x1a, 0x37, - 0x14, 0x2e, 0xf1, 0x0f, 0x70, 0x00, 0xb3, 0x96, 0xed, 0x04, 0xe3, 0x38, 0x71, 0xb6, 0x6d, 0xea, - 0xc9, 0x74, 0xec, 0x29, 0x9d, 0xe4, 0xb2, 0x1d, 0x02, 0xa2, 0xde, 0x09, 0xec, 0x52, 0x01, 0x4e, - 0xdc, 0x5e, 0x68, 0x64, 0x56, 0x86, 0xad, 0xd9, 0x1f, 0xef, 0x8a, 0x36, 0x7e, 0x81, 0xbe, 0x4e, - 0x9f, 0xa2, 0xd7, 0xbd, 0xee, 0xdb, 0x74, 0x24, 0xed, 0x02, 0x76, 0x9c, 0xe9, 0x15, 0xe8, 0xfb, - 0x3e, 0x9d, 0xa3, 0x73, 0x74, 0xce, 0xd1, 0xc2, 0xe3, 0x38, 0x9c, 0x0b, 0x1e, 0xc7, 0xd1, 0xf8, - 0x54, 0xff, 0x3b, 0x89, 0xe2, 0x50, 0x84, 0xa8, 0x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x3c, 0x90, - 0x0a, 0xf4, 0xf5, 0xea, 0x09, 0x3e, 0x9b, 0xc8, 0xfa, 0xcb, 0xff, 0x93, 0x69, 0x2f, 0x6f, 0xbf, - 0xfb, 0xe5, 0x74, 0xe2, 0x89, 0xe9, 0xfc, 0xf2, 0x64, 0x1c, 0xfa, 0xa7, 0x33, 0x6f, 0x32, 0x15, - 0x81, 0x17, 0x4c, 0x02, 0x2e, 0xfe, 0x08, 0xe3, 0xeb, 0xd3, 0x59, 0xe0, 0x9e, 0xaa, 0x07, 0xf6, - 0x74, 0x61, 0xee, 0x72, 0x53, 0x7d, 0x9b, 0x7d, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, - 0xde, 0xa4, 0x83, 0xcb, 0x09, 0x00, 0x00, + // 1456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdb, 0x72, 0x1a, 0x47, + 0x13, 0xfe, 0x31, 0x12, 0x87, 0xe6, 0xa0, 0xd5, 0xe8, 0x60, 0x84, 0x2c, 0x5b, 0xde, 0xff, 0xff, + 0x1d, 0x95, 0xcb, 0x25, 0x55, 0x48, 0xd9, 0x95, 0xab, 0xa4, 0x30, 0x2c, 0xd1, 0x96, 0x60, 0xc1, + 0x03, 0xc8, 0x56, 0x72, 0x31, 0x35, 0x62, 0x47, 0xb0, 0x11, 0xec, 0xae, 0x76, 0x87, 0xc4, 0xe4, + 0x01, 0xf2, 0x3a, 0xc9, 0x4d, 0x6e, 0x73, 0x97, 0x87, 0xc8, 0xdb, 0xa4, 0x66, 0x66, 0x97, 0x83, + 0x8c, 0x92, 0x5c, 0xc1, 0x7e, 0xdf, 0x37, 0xdd, 0xd3, 0x3d, 0xdd, 0x3d, 0x03, 0xfb, 0x81, 0x37, + 0xe5, 0x2c, 0x08, 0xfc, 0xc1, 0x99, 0xfa, 0x77, 0xea, 0x07, 0x1e, 0xf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16, 0x5e, 0xd6, 0xb4, 0xc4, 0x8a, 0x97, + 0x87, 0x1b, 0x6a, 0xc5, 0xcb, 0xdf, 0x74, 0xd6, 0xdb, 0xcf, 0xbf, 0x3d, 0x1b, 0x3a, 0x7c, 0x34, + 0xbd, 0x3e, 0x1d, 0x78, 0x93, 0xb3, 0xb1, 0x33, 0x1c, 0x71, 0xd7, 0x71, 0x87, 0x2e, 0xe3, 0x3f, + 0x7a, 0xc1, 0xed, 0xd9, 0xd8, 0xb5, 0xcf, 0xe4, 0x2b, 0xed, 0x6c, 0x6e, 0xee, 0x3a, 0x25, 0x1f, + 0xf8, 0x5f, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x3e, 0x2a, 0xde, 0x10, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -931,6 +1153,10 @@ type RouterClient interface { //ResetMissionControl clears all mission control state and starts with a clean //slate. ResetMissionControl(ctx context.Context, in *ResetMissionControlRequest, opts ...grpc.CallOption) (*ResetMissionControlResponse, error) + //* + //QueryMissionControl exposes the internal mission control state to callers. + //It is a development feature. + QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error) } type routerClient struct { @@ -977,6 +1203,15 @@ func (c *routerClient) ResetMissionControl(ctx context.Context, in *ResetMission return out, nil } +func (c *routerClient) QueryMissionControl(ctx context.Context, in *QueryMissionControlRequest, opts ...grpc.CallOption) (*QueryMissionControlResponse, error) { + out := new(QueryMissionControlResponse) + err := c.cc.Invoke(ctx, "/routerrpc.Router/QueryMissionControl", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // RouterServer is the server API for Router service. type RouterServer interface { //* @@ -999,6 +1234,10 @@ type RouterServer interface { //ResetMissionControl clears all mission control state and starts with a clean //slate. ResetMissionControl(context.Context, *ResetMissionControlRequest) (*ResetMissionControlResponse, error) + //* + //QueryMissionControl exposes the internal mission control state to callers. + //It is a development feature. + QueryMissionControl(context.Context, *QueryMissionControlRequest) (*QueryMissionControlResponse, error) } func RegisterRouterServer(s *grpc.Server, srv RouterServer) { @@ -1077,6 +1316,24 @@ func _Router_ResetMissionControl_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Router_QueryMissionControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMissionControlRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterServer).QueryMissionControl(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/routerrpc.Router/QueryMissionControl", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterServer).QueryMissionControl(ctx, req.(*QueryMissionControlRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Router_serviceDesc = grpc.ServiceDesc{ ServiceName: "routerrpc.Router", HandlerType: (*RouterServer)(nil), @@ -1097,6 +1354,10 @@ var _Router_serviceDesc = grpc.ServiceDesc{ MethodName: "ResetMissionControl", Handler: _Router_ResetMissionControl_Handler, }, + { + MethodName: "QueryMissionControl", + Handler: _Router_QueryMissionControl_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "routerrpc/router.proto", diff --git a/lnrpc/routerrpc/router.proto b/lnrpc/routerrpc/router.proto index 852170546..f65a8c11e 100644 --- a/lnrpc/routerrpc/router.proto +++ b/lnrpc/routerrpc/router.proto @@ -249,6 +249,43 @@ message ResetMissionControlRequest{} message ResetMissionControlResponse{} +message QueryMissionControlRequest {} + +/// QueryMissionControlResponse contains mission control state per node. +message QueryMissionControlResponse { + repeated NodeHistory nodes = 1; +} + +/// NodeHistory contains the mission control state for a particular node. +message NodeHistory { + /// Node pubkey + bytes pubkey = 1 [json_name = "pubkey"]; + + /// Time stamp of last failure. Set to zero if no failure happened yet. + int64 last_fail_time = 2 [json_name = "last_fail_time"]; + + /// Estimation of success probability for channels not in the channel array. + float other_chan_success_prob = 3 [json_name = "other_chan_success_prob"]; + + /// Historical information of particular channels. + repeated ChannelHistory channels = 4 [json_name = "channels"]; +} + +/// NodeHistory contains the mission control state for a particular channel. +message ChannelHistory { + /// Short channel id + uint64 channel_id = 1 [json_name = "channel_id"]; + + /// Time stamp of last failure. + int64 last_fail_time = 2 [json_name = "last_fail_time"]; + + /// Minimum penalization amount. + int64 min_penalize_amt_sat = 3 [json_name = "min_penalize_amt_sat"]; + + /// Estimation of success probability for this channel. + float success_prob = 4 [json_name = "success_prob"]; +} + service Router { /** SendPayment attempts to route a payment described by the passed @@ -277,4 +314,10 @@ service Router { slate. */ rpc ResetMissionControl(ResetMissionControlRequest) returns (ResetMissionControlResponse); + + /** + QueryMissionControl exposes the internal mission control state to callers. + It is a development feature. + */ + rpc QueryMissionControl(QueryMissionControlRequest) returns (QueryMissionControlResponse); } diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index d47dbe69d..9f1ca2085 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -59,6 +59,10 @@ var ( Entity: "offchain", Action: "read", }}, + "/routerrpc.Router/QueryMissionControl": {{ + Entity: "offchain", + Action: "read", + }}, "/routerrpc.Router/ResetMissionControl": {{ Entity: "offchain", Action: "write", @@ -453,3 +457,46 @@ func (s *Server) ResetMissionControl(ctx context.Context, return &ResetMissionControlResponse{}, nil } + +// QueryMissionControl exposes the internal mission control state to callers. It +// is a development feature. +func (s *Server) QueryMissionControl(ctx context.Context, + req *QueryMissionControlRequest) (*QueryMissionControlResponse, error) { + + snapshot := s.cfg.RouterBackend.MissionControl.GetHistorySnapshot() + + rpcNodes := make([]*NodeHistory, len(snapshot.Nodes)) + for i, node := range snapshot.Nodes { + channels := make([]*ChannelHistory, len(node.Channels)) + for j, channel := range node.Channels { + channels[j] = &ChannelHistory{ + ChannelId: channel.ChannelID, + LastFailTime: channel.LastFail.Unix(), + MinPenalizeAmtSat: int64( + channel.MinPenalizeAmt.ToSatoshis(), + ), + SuccessProb: float32(channel.SuccessProb), + } + } + + var lastFail int64 + if node.LastFail != nil { + lastFail = node.LastFail.Unix() + } + + rpcNodes[i] = &NodeHistory{ + Pubkey: node.Node[:], + LastFailTime: lastFail, + OtherChanSuccessProb: float32( + node.OtherChanSuccessProb, + ), + Channels: channels, + } + } + + response := QueryMissionControlResponse{ + Nodes: rpcNodes, + } + + return &response, nil +} diff --git a/routing/missioncontrol.go b/routing/missioncontrol.go index 727858e7f..1a98e174f 100644 --- a/routing/missioncontrol.go +++ b/routing/missioncontrol.go @@ -84,6 +84,48 @@ type channelHistory struct { minPenalizeAmt lnwire.MilliSatoshi } +// MissionControlSnapshot contains a snapshot of the current state of mission +// control. +type MissionControlSnapshot struct { + // Nodes contains the per node information of this snapshot. + Nodes []MissionControlNodeSnapshot +} + +// MissionControlNodeSnapshot contains a snapshot of the current node state in +// mission control. +type MissionControlNodeSnapshot struct { + // Node pubkey. + Node route.Vertex + + // Lastfail is the time of last failure, if any. + LastFail *time.Time + + // Channels is a list of channels for which specific information is + // logged. + Channels []MissionControlChannelSnapshot + + // OtherChanSuccessProb is the success probability for channels not in + // the Channels slice. + OtherChanSuccessProb float64 +} + +// MissionControlChannelSnapshot contains a snapshot of the current channel +// state in mission control. +type MissionControlChannelSnapshot struct { + // ChannelID is the short channel id of the snapshot. + ChannelID uint64 + + // LastFail is the time of last failure. + LastFail time.Time + + // MinPenalizeAmt is the minimum amount for which the channel will be + // penalized. + MinPenalizeAmt lnwire.MilliSatoshi + + // SuccessProb is the success probability estimation for this channel. + SuccessProb float64 +} + // NewMissionControl returns a new instance of missionControl. // // TODO(roasbeef): persist memory @@ -358,3 +400,55 @@ func (m *MissionControl) reportEdgeFailure(failedEdge edge, minPenalizeAmt: minPenalizeAmt, } } + +// GetHistorySnapshot takes a snapshot from the current mission control state +// and actual probability estimates. +func (m *MissionControl) GetHistorySnapshot() *MissionControlSnapshot { + m.Lock() + defer m.Unlock() + + log.Debugf("Requesting history snapshot from mission control: "+ + "node_count=%v", len(m.history)) + + nodes := make([]MissionControlNodeSnapshot, 0, len(m.history)) + + for v, h := range m.history { + channelSnapshot := make([]MissionControlChannelSnapshot, 0, + len(h.channelLastFail), + ) + + for id, lastFail := range h.channelLastFail { + // Show probability assuming amount meets min + // penalization amount. + prob := m.getEdgeProbabilityForNode( + h, id, lastFail.minPenalizeAmt, + ) + + channelSnapshot = append(channelSnapshot, + MissionControlChannelSnapshot{ + ChannelID: id, + LastFail: lastFail.lastFail, + MinPenalizeAmt: lastFail.minPenalizeAmt, + SuccessProb: prob, + }, + ) + } + + otherProb := m.getEdgeProbabilityForNode(h, 0, 0) + + nodes = append(nodes, + MissionControlNodeSnapshot{ + Node: v, + LastFail: h.lastFail, + OtherChanSuccessProb: otherProb, + Channels: channelSnapshot, + }, + ) + } + + snapshot := MissionControlSnapshot{ + Nodes: nodes, + } + + return &snapshot +} diff --git a/routing/missioncontrol_test.go b/routing/missioncontrol_test.go index 39ebb5bdd..ed79c5f20 100644 --- a/routing/missioncontrol_test.go +++ b/routing/missioncontrol_test.go @@ -64,4 +64,14 @@ func TestMissionControl(t *testing.T) { // to zero. mc.reportVertexFailure(testNode) expectP(1000, 0) + + // Check whether history snapshot looks sane. + history := mc.GetHistorySnapshot() + if len(history.Nodes) != 1 { + t.Fatal("unexpected number of nodes") + } + + if len(history.Nodes[0].Channels) != 1 { + t.Fatal("unexpected number of channels") + } }