diff --git a/htlcswitch/htlcnotifier.go b/htlcswitch/htlcnotifier.go index 25953e656659..b0ad8bc14586 100644 --- a/htlcswitch/htlcnotifier.go +++ b/htlcswitch/htlcnotifier.go @@ -219,8 +219,31 @@ type ForwardingEvent struct { // receive, or as part of a forward. HtlcEventType - // Timestamp is the time when this htlc was forwarded. - Timestamp time.Time + // timestamp is the time when this htlc was forwarded. + timestamp time.Time +} + +// Timestamp returns the time that the event occurred. +// +// Note: part of the HtlcEvent interface. +func (e *ForwardingEvent) Timestamp() time.Time { + return e.timestamp +} + +// Key returns the htlc key which identifies the htlc that +// the event is associated with. +// +// Note: part of the HtlcEvent interface. +func (e *ForwardingEvent) Key() HtlcKey { + return e.HtlcKey +} + +// EventType returns the type of event the htlc is associated with, +// a local send or receive, or a forward. +// +// Note: part of the HtlcEvent interface. +func (e *ForwardingEvent) EventType() HtlcEventType { + return e.HtlcEventType } // LinkFailEvent describes a htlc that failed on our incoming or outgoing @@ -248,7 +271,30 @@ type LinkFailEvent struct { Incoming bool // Timestamp is the time when the link failure occurred. - Timestamp time.Time + timestamp time.Time +} + +// Timestamp returns the time that the event occurred. +// +// Note: part of the HtlcEvent interface. +func (e *LinkFailEvent) Timestamp() time.Time { + return e.timestamp +} + +// Key returns the htlc key which identifies the htlc that +// the event is associated with. +// +// Note: part of the HtlcEvent interface. +func (e *LinkFailEvent) Key() HtlcKey { + return e.HtlcKey +} + +// EventType returns the type of event the htlc is associated with, +// a local send or receive, or a forward. +// +// Note: part of the HtlcEvent interface. +func (e *LinkFailEvent) EventType() HtlcEventType { + return e.HtlcEventType } // ForwardingFailEvent represents a htlc failure which occurred down the line @@ -266,8 +312,31 @@ type ForwardingFailEvent struct { // receive, or as part of a forward. HtlcEventType - // Timestamp is the time when the forwarding failure was received. - Timestamp time.Time + // timestamp is the time when the forwarding failure was received. + timestamp time.Time +} + +// Timestamp returns the time that the event occurred. +// +// Note: part of the HtlcEvent interface. +func (e *ForwardingFailEvent) Timestamp() time.Time { + return e.timestamp +} + +// Key returns the htlc key which identifies the htlc that +// the event is associated with. +// +// Note: part of the HtlcEvent interface. +func (e *ForwardingFailEvent) Key() HtlcKey { + return e.HtlcKey +} + +// EventType returns the type of event the htlc is associated with, +// a local send or receive, or a forward. +// +// Note: part of the HtlcEvent interface. +func (e *ForwardingFailEvent) EventType() HtlcEventType { + return e.HtlcEventType } // SettleEvent represents a htlc that was settled. HtlcInfo is not reliably @@ -283,8 +352,31 @@ type SettleEvent struct { // receive, or as part of a forward. HtlcEventType - // Timestamp is the time when this htlc was settled. - Timestamp time.Time + // timestamp is the time when this htlc was settled. + timestamp time.Time +} + +// Timestamp returns the time that the event occurred. +// +// Note: part of the HtlcEvent interface. +func (e *SettleEvent) Timestamp() time.Time { + return e.timestamp +} + +// Key returns the htlc key which identifies the htlc that +// the event is associated with. +// +// Note: part of the HtlcEvent interface. +func (e *SettleEvent) Key() HtlcKey { + return e.HtlcKey +} + +// EventType returns the type of event the htlc is associated with, +// a local send or receive, or a forward. +// +// Note: part of the HtlcEvent interface. +func (e *SettleEvent) EventType() HtlcEventType { + return e.HtlcEventType } // NotifyForwardingEvent notifies the HtlcNotifier than a htlc has been @@ -298,7 +390,7 @@ func (h *HtlcNotifier) NotifyForwardingEvent(key HtlcKey, info HtlcInfo, HtlcKey: key, HtlcInfo: info, HtlcEventType: eventType, - Timestamp: h.now(), + timestamp: h.now(), } log.Tracef("Notifying forward event: %v over %v, %v", eventType, key, @@ -322,7 +414,7 @@ func (h *HtlcNotifier) NotifyLinkFailEvent(key HtlcKey, info HtlcInfo, HtlcEventType: eventType, LinkError: linkErr, Incoming: incoming, - Timestamp: h.now(), + timestamp: h.now(), } log.Tracef("Notifying link failure event: %v over %v, %v", eventType, @@ -343,7 +435,7 @@ func (h *HtlcNotifier) NotifyForwardingFailEvent(key HtlcKey, event := &ForwardingFailEvent{ HtlcKey: key, HtlcEventType: eventType, - Timestamp: h.now(), + timestamp: h.now(), } log.Tracef("Notifying forwarding failure event: %v over %v", eventType, @@ -362,7 +454,7 @@ func (h *HtlcNotifier) NotifySettleEvent(key HtlcKey, eventType HtlcEventType) { event := &SettleEvent{ HtlcKey: key, HtlcEventType: eventType, - Timestamp: h.now(), + timestamp: h.now(), } log.Tracef("Notifying settle event: %v over %v", eventType, key) diff --git a/htlcswitch/interfaces.go b/htlcswitch/interfaces.go index b28d137f5a88..378f53b566c8 100644 --- a/htlcswitch/interfaces.go +++ b/htlcswitch/interfaces.go @@ -1,6 +1,8 @@ package htlcswitch import ( + "time" + "github.com/btcsuite/btcd/wire" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/invoices" @@ -206,3 +208,17 @@ type htlcNotifier interface { // settled. NotifySettleEvent(key HtlcKey, eventType HtlcEventType) } + +// HtlcEvent is an interface that is implemented by all htlc events. +type HtlcEvent interface { + // Key returns the htlc key which identifies the htlc that + // the event is associated with. + Key() HtlcKey + + // Timestamp returns the time that the event occurred. + Timestamp() time.Time + + // EventType returns the type of event the htlc is associated with, + // a local send or receive, or a forward. + EventType() HtlcEventType +} diff --git a/htlcswitch/switch_test.go b/htlcswitch/switch_test.go index 9cfed11774e7..f82643b91ca8 100644 --- a/htlcswitch/switch_test.go +++ b/htlcswitch/switch_test.go @@ -2708,7 +2708,7 @@ func TestInvalidFailure(t *testing.T) { // these tests. type htlcNotifierEvents func(channels *clusterChannels, htlcID uint64, ts time.Time, htlc *lnwire.UpdateAddHTLC, - hops []*hop.Payload) ([]interface{}, []interface{}, []interface{}) + hops []*hop.Payload) ([]HtlcEvent, []HtlcEvent, []HtlcEvent) // TestHtlcNotifier tests the notifying of htlc events that are routed over a // three hop network. It sets up an Alice -> Bob -> Carol network and routes @@ -2739,8 +2739,8 @@ func TestHtlcNotifier(t *testing.T) { expectedEvents: func(channels *clusterChannels, htlcID uint64, ts time.Time, htlc *lnwire.UpdateAddHTLC, - hops []*hop.Payload) ([]interface{}, - []interface{}, []interface{}) { + hops []*hop.Payload) ([]HtlcEvent, + []HtlcEvent, []HtlcEvent) { return getThreeHopEvents( channels, htlcID, ts, htlc, hops, nil, @@ -2758,8 +2758,8 @@ func TestHtlcNotifier(t *testing.T) { expectedEvents: func(channels *clusterChannels, htlcID uint64, ts time.Time, htlc *lnwire.UpdateAddHTLC, - hops []*hop.Payload) ([]interface{}, - []interface{}, []interface{}) { + hops []*hop.Payload) ([]HtlcEvent, + []HtlcEvent, []HtlcEvent) { return getThreeHopEvents( channels, htlcID, ts, htlc, hops, @@ -2893,7 +2893,7 @@ func testHtcNotifier(t *testing.T, testOpts []serverOption, iterations int, // checkHtlcEvents checks that a subscription has the set of htlc events // we expect it to have. func checkHtlcEvents(t *testing.T, events <-chan interface{}, - expectedEvents []interface{}) { + expectedEvents []HtlcEvent) { for _, expected := range expectedEvents { select { @@ -2949,7 +2949,7 @@ func (n *threeHopNetwork) sendThreeHopPayment(t *testing.T) (*lnwire.UpdateAddHT // of events will fail on Bob's outgoing link. func getThreeHopEvents(channels *clusterChannels, htlcID uint64, ts time.Time, htlc *lnwire.UpdateAddHTLC, hops []*hop.Payload, - linkError *LinkError) ([]interface{}, []interface{}, []interface{}) { + linkError *LinkError) ([]HtlcEvent, []HtlcEvent, []HtlcEvent) { aliceKey := HtlcKey{ IncomingCircuit: zeroCircuit, @@ -2961,7 +2961,7 @@ func getThreeHopEvents(channels *clusterChannels, htlcID uint64, // Alice always needs a forwarding event because she initiates the // send. - aliceEvents := []interface{}{ + aliceEvents := []HtlcEvent{ &ForwardingEvent{ HtlcKey: aliceKey, HtlcInfo: HtlcInfo{ @@ -2969,7 +2969,7 @@ func getThreeHopEvents(channels *clusterChannels, htlcID uint64, OutgoingAmt: htlc.Amount, }, HtlcEventType: HtlcEventTypeSend, - Timestamp: ts, + timestamp: ts, }, } @@ -2998,18 +2998,18 @@ func getThreeHopEvents(channels *clusterChannels, htlcID uint64, &ForwardingFailEvent{ HtlcKey: aliceKey, HtlcEventType: HtlcEventTypeSend, - Timestamp: ts, + timestamp: ts, }, ) - bobEvents := []interface{}{ + bobEvents := []HtlcEvent{ &LinkFailEvent{ HtlcKey: bobKey, HtlcInfo: bobInfo, HtlcEventType: HtlcEventTypeForward, LinkError: linkError, Incoming: false, - Timestamp: ts, + timestamp: ts, }, } @@ -3024,25 +3024,25 @@ func getThreeHopEvents(channels *clusterChannels, htlcID uint64, &SettleEvent{ HtlcKey: aliceKey, HtlcEventType: HtlcEventTypeSend, - Timestamp: ts, + timestamp: ts, }, ) - bobEvents := []interface{}{ + bobEvents := []HtlcEvent{ &ForwardingEvent{ HtlcKey: bobKey, HtlcInfo: bobInfo, HtlcEventType: HtlcEventTypeForward, - Timestamp: ts, + timestamp: ts, }, &SettleEvent{ HtlcKey: bobKey, HtlcEventType: HtlcEventTypeForward, - Timestamp: ts, + timestamp: ts, }, } - carolEvents := []interface{}{ + carolEvents := []HtlcEvent{ &SettleEvent{ HtlcKey: HtlcKey{ IncomingCircuit: channeldb.CircuitKey{ @@ -3052,7 +3052,7 @@ func getThreeHopEvents(channels *clusterChannels, htlcID uint64, OutgoingCircuit: zeroCircuit, }, HtlcEventType: HtlcEventTypeReceive, - Timestamp: ts, + timestamp: ts, }, } diff --git a/lnrpc/routerrpc/router.pb.go b/lnrpc/routerrpc/router.pb.go index 25aa0b0911ba..a300bd1cda55 100644 --- a/lnrpc/routerrpc/router.pb.go +++ b/lnrpc/routerrpc/router.pb.go @@ -79,6 +79,94 @@ func (PaymentState) EnumDescriptor() ([]byte, []int) { return fileDescriptor_7a0613f69d37b0a5, []int{0} } +type FailureDetail int32 + +const ( + FailureDetail_UNKNOWN FailureDetail = 0 + FailureDetail_NO_DETAIL FailureDetail = 1 + FailureDetail_ONION_DECODE FailureDetail = 2 + FailureDetail_LINK_NOT_ELIGIBLE FailureDetail = 3 + FailureDetail_ON_CHAIN_TIMEOUT FailureDetail = 4 + FailureDetail_HTLC_EXCEEDS_MAX FailureDetail = 5 + FailureDetail_INSUFFICIENT_BALANCE FailureDetail = 6 + FailureDetail_INCOMPLETE_FORWARD FailureDetail = 7 + FailureDetail_HTLC_ADD_FAILED FailureDetail = 8 + FailureDetail_FORWARDS_DISABLED FailureDetail = 9 + FailureDetail_INVOICE_CANCELED FailureDetail = 10 + FailureDetail_INVOICE_UNDERPAID FailureDetail = 11 + FailureDetail_INVOICE_EXPIRY_TOO_SOON FailureDetail = 12 + FailureDetail_INVOICE_NOT_OPEN FailureDetail = 13 + FailureDetail_MPP_INVOICE_TIMEOUT FailureDetail = 14 + FailureDetail_ADDRESS_MISMATCH FailureDetail = 15 + FailureDetail_SET_TOTAL_MISMATCH FailureDetail = 16 + FailureDetail_SET_TOTAL_TOO_LOW FailureDetail = 17 + FailureDetail_SET_OVERPAID FailureDetail = 18 + FailureDetail_UNKNOWN_INVOICE FailureDetail = 19 + FailureDetail_INVALID_KEYSEND FailureDetail = 20 + FailureDetail_MPP_IN_PROGRESS FailureDetail = 21 + FailureDetail_CIRCULAR_ROUTE FailureDetail = 22 +) + +var FailureDetail_name = map[int32]string{ + 0: "UNKNOWN", + 1: "NO_DETAIL", + 2: "ONION_DECODE", + 3: "LINK_NOT_ELIGIBLE", + 4: "ON_CHAIN_TIMEOUT", + 5: "HTLC_EXCEEDS_MAX", + 6: "INSUFFICIENT_BALANCE", + 7: "INCOMPLETE_FORWARD", + 8: "HTLC_ADD_FAILED", + 9: "FORWARDS_DISABLED", + 10: "INVOICE_CANCELED", + 11: "INVOICE_UNDERPAID", + 12: "INVOICE_EXPIRY_TOO_SOON", + 13: "INVOICE_NOT_OPEN", + 14: "MPP_INVOICE_TIMEOUT", + 15: "ADDRESS_MISMATCH", + 16: "SET_TOTAL_MISMATCH", + 17: "SET_TOTAL_TOO_LOW", + 18: "SET_OVERPAID", + 19: "UNKNOWN_INVOICE", + 20: "INVALID_KEYSEND", + 21: "MPP_IN_PROGRESS", + 22: "CIRCULAR_ROUTE", +} + +var FailureDetail_value = map[string]int32{ + "UNKNOWN": 0, + "NO_DETAIL": 1, + "ONION_DECODE": 2, + "LINK_NOT_ELIGIBLE": 3, + "ON_CHAIN_TIMEOUT": 4, + "HTLC_EXCEEDS_MAX": 5, + "INSUFFICIENT_BALANCE": 6, + "INCOMPLETE_FORWARD": 7, + "HTLC_ADD_FAILED": 8, + "FORWARDS_DISABLED": 9, + "INVOICE_CANCELED": 10, + "INVOICE_UNDERPAID": 11, + "INVOICE_EXPIRY_TOO_SOON": 12, + "INVOICE_NOT_OPEN": 13, + "MPP_INVOICE_TIMEOUT": 14, + "ADDRESS_MISMATCH": 15, + "SET_TOTAL_MISMATCH": 16, + "SET_TOTAL_TOO_LOW": 17, + "SET_OVERPAID": 18, + "UNKNOWN_INVOICE": 19, + "INVALID_KEYSEND": 20, + "MPP_IN_PROGRESS": 21, + "CIRCULAR_ROUTE": 22, +} + +func (x FailureDetail) String() string { + return proto.EnumName(FailureDetail_name, int32(x)) +} + +func (FailureDetail) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{1} +} + type Failure_FailureCode int32 const ( @@ -185,6 +273,37 @@ func (Failure_FailureCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_7a0613f69d37b0a5, []int{7, 0} } +type HtlcEvent_EventType int32 + +const ( + HtlcEvent_UNKNOWN HtlcEvent_EventType = 0 + HtlcEvent_SEND HtlcEvent_EventType = 1 + HtlcEvent_RECEIVE HtlcEvent_EventType = 2 + HtlcEvent_FORWARD HtlcEvent_EventType = 3 +) + +var HtlcEvent_EventType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SEND", + 2: "RECEIVE", + 3: "FORWARD", +} + +var HtlcEvent_EventType_value = map[string]int32{ + "UNKNOWN": 0, + "SEND": 1, + "RECEIVE": 2, + "FORWARD": 3, +} + +func (x HtlcEvent_EventType) String() string { + return proto.EnumName(HtlcEvent_EventType_name, int32(x)) +} + +func (HtlcEvent_EventType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{20, 0} +} + type SendPaymentRequest struct { /// The identity pubkey of the payment recipient Dest []byte `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` @@ -1501,9 +1620,408 @@ func (m *BuildRouteResponse) GetRoute() *lnrpc.Route { return nil } +type SubscribeHtlcEventsRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubscribeHtlcEventsRequest) Reset() { *m = SubscribeHtlcEventsRequest{} } +func (m *SubscribeHtlcEventsRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeHtlcEventsRequest) ProtoMessage() {} +func (*SubscribeHtlcEventsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{19} +} + +func (m *SubscribeHtlcEventsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeHtlcEventsRequest.Unmarshal(m, b) +} +func (m *SubscribeHtlcEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeHtlcEventsRequest.Marshal(b, m, deterministic) +} +func (m *SubscribeHtlcEventsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeHtlcEventsRequest.Merge(m, src) +} +func (m *SubscribeHtlcEventsRequest) XXX_Size() int { + return xxx_messageInfo_SubscribeHtlcEventsRequest.Size(m) +} +func (m *SubscribeHtlcEventsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeHtlcEventsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeHtlcEventsRequest proto.InternalMessageInfo + +type HtlcEvent struct { + //* + //IncomingChannel is the channel that the incoming htlc arrived at our node + //on. This value is zero for sends. + IncomingChannel uint64 `protobuf:"varint,1,opt,name=incoming_channel,proto3" json:"incoming_channel,omitempty"` + //* + //Outgoing channel is the channel that the outgoing htlc left our node on. + //This value is zero for receives. + OutgoingChannel uint64 `protobuf:"varint,2,opt,name=outgoing_channel,proto3" json:"outgoing_channel,omitempty"` + //* + //Incoming id is the index of the incoming htlc in the incoming channel. + //This value is zero for sends. + IncomingHtlcId uint64 `protobuf:"varint,3,opt,name=incoming_htlc_id,proto3" json:"incoming_htlc_id,omitempty"` + //* + //Outgoing id is the index of the outgoing htlc in the outgoing channel. + //This value is zero for receives. + OutgoingHtlcId uint64 `protobuf:"varint,4,opt,name=outgoing_htlc_id,proto3" json:"outgoing_htlc_id,omitempty"` + // The timelock on the incoming htlc. + IncomingTimelock uint32 `protobuf:"varint,5,opt,name=incoming_timelock,proto3" json:"incoming_timelock,omitempty"` + // The timelock on the outgoing htlc. + OutgoingTimelock uint32 `protobuf:"varint,6,opt,name=outgoing_timelock,proto3" json:"outgoing_timelock,omitempty"` + // The amount of the incoming htlc. + IncomingAmtMsat uint64 `protobuf:"varint,7,opt,name=incoming_amt_msat,proto3" json:"incoming_amt_msat,omitempty"` + // The amount of the outgoing htlc. + OutgoingAmtMsat uint64 `protobuf:"varint,8,opt,name=outgoing_amt_msat,proto3" json:"outgoing_amt_msat,omitempty"` + //* + //Timestamp is the time (unix epoch offset in seconds) that the event + //occurred. + Timestamp uint64 `protobuf:"varint,9,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + //* + //The event type indicates whether the htlc was part of a send, receive or + //forward. + EventType HtlcEvent_EventType `protobuf:"varint,10,opt,name=event_type,proto3,enum=routerrpc.HtlcEvent_EventType" json:"event_type,omitempty"` + // Types that are valid to be assigned to Event: + // *HtlcEvent_ForwardEvent + // *HtlcEvent_ForwardFailEvent + // *HtlcEvent_SettleEvent + // *HtlcEvent_LinkFailEvent + Event isHtlcEvent_Event `protobuf_oneof:"event"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HtlcEvent) Reset() { *m = HtlcEvent{} } +func (m *HtlcEvent) String() string { return proto.CompactTextString(m) } +func (*HtlcEvent) ProtoMessage() {} +func (*HtlcEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{20} +} + +func (m *HtlcEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HtlcEvent.Unmarshal(m, b) +} +func (m *HtlcEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HtlcEvent.Marshal(b, m, deterministic) +} +func (m *HtlcEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_HtlcEvent.Merge(m, src) +} +func (m *HtlcEvent) XXX_Size() int { + return xxx_messageInfo_HtlcEvent.Size(m) +} +func (m *HtlcEvent) XXX_DiscardUnknown() { + xxx_messageInfo_HtlcEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_HtlcEvent proto.InternalMessageInfo + +func (m *HtlcEvent) GetIncomingChannel() uint64 { + if m != nil { + return m.IncomingChannel + } + return 0 +} + +func (m *HtlcEvent) GetOutgoingChannel() uint64 { + if m != nil { + return m.OutgoingChannel + } + return 0 +} + +func (m *HtlcEvent) GetIncomingHtlcId() uint64 { + if m != nil { + return m.IncomingHtlcId + } + return 0 +} + +func (m *HtlcEvent) GetOutgoingHtlcId() uint64 { + if m != nil { + return m.OutgoingHtlcId + } + return 0 +} + +func (m *HtlcEvent) GetIncomingTimelock() uint32 { + if m != nil { + return m.IncomingTimelock + } + return 0 +} + +func (m *HtlcEvent) GetOutgoingTimelock() uint32 { + if m != nil { + return m.OutgoingTimelock + } + return 0 +} + +func (m *HtlcEvent) GetIncomingAmtMsat() uint64 { + if m != nil { + return m.IncomingAmtMsat + } + return 0 +} + +func (m *HtlcEvent) GetOutgoingAmtMsat() uint64 { + if m != nil { + return m.OutgoingAmtMsat + } + return 0 +} + +func (m *HtlcEvent) GetTimestamp() uint64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *HtlcEvent) GetEventType() HtlcEvent_EventType { + if m != nil { + return m.EventType + } + return HtlcEvent_UNKNOWN +} + +type isHtlcEvent_Event interface { + isHtlcEvent_Event() +} + +type HtlcEvent_ForwardEvent struct { + ForwardEvent *ForwardEvent `protobuf:"bytes,11,opt,name=forward_event,proto3,oneof"` +} + +type HtlcEvent_ForwardFailEvent struct { + ForwardFailEvent *ForwardFailEvent `protobuf:"bytes,12,opt,name=forward_fail_event,proto3,oneof"` +} + +type HtlcEvent_SettleEvent struct { + SettleEvent *SettleEvent `protobuf:"bytes,13,opt,name=settle_event,proto3,oneof"` +} + +type HtlcEvent_LinkFailEvent struct { + LinkFailEvent *LinkFailEvent `protobuf:"bytes,14,opt,name=link_fail_event,proto3,oneof"` +} + +func (*HtlcEvent_ForwardEvent) isHtlcEvent_Event() {} + +func (*HtlcEvent_ForwardFailEvent) isHtlcEvent_Event() {} + +func (*HtlcEvent_SettleEvent) isHtlcEvent_Event() {} + +func (*HtlcEvent_LinkFailEvent) isHtlcEvent_Event() {} + +func (m *HtlcEvent) GetEvent() isHtlcEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (m *HtlcEvent) GetForwardEvent() *ForwardEvent { + if x, ok := m.GetEvent().(*HtlcEvent_ForwardEvent); ok { + return x.ForwardEvent + } + return nil +} + +func (m *HtlcEvent) GetForwardFailEvent() *ForwardFailEvent { + if x, ok := m.GetEvent().(*HtlcEvent_ForwardFailEvent); ok { + return x.ForwardFailEvent + } + return nil +} + +func (m *HtlcEvent) GetSettleEvent() *SettleEvent { + if x, ok := m.GetEvent().(*HtlcEvent_SettleEvent); ok { + return x.SettleEvent + } + return nil +} + +func (m *HtlcEvent) GetLinkFailEvent() *LinkFailEvent { + if x, ok := m.GetEvent().(*HtlcEvent_LinkFailEvent); ok { + return x.LinkFailEvent + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*HtlcEvent) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*HtlcEvent_ForwardEvent)(nil), + (*HtlcEvent_ForwardFailEvent)(nil), + (*HtlcEvent_SettleEvent)(nil), + (*HtlcEvent_LinkFailEvent)(nil), + } +} + +type ForwardEvent struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ForwardEvent) Reset() { *m = ForwardEvent{} } +func (m *ForwardEvent) String() string { return proto.CompactTextString(m) } +func (*ForwardEvent) ProtoMessage() {} +func (*ForwardEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{21} +} + +func (m *ForwardEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ForwardEvent.Unmarshal(m, b) +} +func (m *ForwardEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ForwardEvent.Marshal(b, m, deterministic) +} +func (m *ForwardEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForwardEvent.Merge(m, src) +} +func (m *ForwardEvent) XXX_Size() int { + return xxx_messageInfo_ForwardEvent.Size(m) +} +func (m *ForwardEvent) XXX_DiscardUnknown() { + xxx_messageInfo_ForwardEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_ForwardEvent proto.InternalMessageInfo + +type ForwardFailEvent struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ForwardFailEvent) Reset() { *m = ForwardFailEvent{} } +func (m *ForwardFailEvent) String() string { return proto.CompactTextString(m) } +func (*ForwardFailEvent) ProtoMessage() {} +func (*ForwardFailEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{22} +} + +func (m *ForwardFailEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ForwardFailEvent.Unmarshal(m, b) +} +func (m *ForwardFailEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ForwardFailEvent.Marshal(b, m, deterministic) +} +func (m *ForwardFailEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForwardFailEvent.Merge(m, src) +} +func (m *ForwardFailEvent) XXX_Size() int { + return xxx_messageInfo_ForwardFailEvent.Size(m) +} +func (m *ForwardFailEvent) XXX_DiscardUnknown() { + xxx_messageInfo_ForwardFailEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_ForwardFailEvent proto.InternalMessageInfo + +type SettleEvent struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SettleEvent) Reset() { *m = SettleEvent{} } +func (m *SettleEvent) String() string { return proto.CompactTextString(m) } +func (*SettleEvent) ProtoMessage() {} +func (*SettleEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{23} +} + +func (m *SettleEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SettleEvent.Unmarshal(m, b) +} +func (m *SettleEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SettleEvent.Marshal(b, m, deterministic) +} +func (m *SettleEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_SettleEvent.Merge(m, src) +} +func (m *SettleEvent) XXX_Size() int { + return xxx_messageInfo_SettleEvent.Size(m) +} +func (m *SettleEvent) XXX_DiscardUnknown() { + xxx_messageInfo_SettleEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_SettleEvent proto.InternalMessageInfo + +type LinkFailEvent struct { + // FailureCode is the BOLT error code for the failure. + WireFailure Failure_FailureCode `protobuf:"varint,1,opt,name=wire_failure,proto3,enum=routerrpc.Failure_FailureCode" json:"wire_failure,omitempty"` + //* + //FailureDetail provides additional information about the reason for the + //failure. This detail enriches the information provided by the wire message + //and may be 'no detail' if the wire message requires no additional metadata. + FailureDetail FailureDetail `protobuf:"varint,2,opt,name=failure_detail,proto3,enum=routerrpc.FailureDetail" json:"failure_detail,omitempty"` + // A string representation of the link failure. + FailureString string `protobuf:"bytes,3,opt,name=failure_string,proto3" json:"failure_string,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LinkFailEvent) Reset() { *m = LinkFailEvent{} } +func (m *LinkFailEvent) String() string { return proto.CompactTextString(m) } +func (*LinkFailEvent) ProtoMessage() {} +func (*LinkFailEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_7a0613f69d37b0a5, []int{24} +} + +func (m *LinkFailEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LinkFailEvent.Unmarshal(m, b) +} +func (m *LinkFailEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LinkFailEvent.Marshal(b, m, deterministic) +} +func (m *LinkFailEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_LinkFailEvent.Merge(m, src) +} +func (m *LinkFailEvent) XXX_Size() int { + return xxx_messageInfo_LinkFailEvent.Size(m) +} +func (m *LinkFailEvent) XXX_DiscardUnknown() { + xxx_messageInfo_LinkFailEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_LinkFailEvent proto.InternalMessageInfo + +func (m *LinkFailEvent) GetWireFailure() Failure_FailureCode { + if m != nil { + return m.WireFailure + } + return Failure_RESERVED +} + +func (m *LinkFailEvent) GetFailureDetail() FailureDetail { + if m != nil { + return m.FailureDetail + } + return FailureDetail_UNKNOWN +} + +func (m *LinkFailEvent) GetFailureString() string { + if m != nil { + return m.FailureString + } + return "" +} + func init() { proto.RegisterEnum("routerrpc.PaymentState", PaymentState_name, PaymentState_value) + proto.RegisterEnum("routerrpc.FailureDetail", FailureDetail_name, FailureDetail_value) proto.RegisterEnum("routerrpc.Failure_FailureCode", Failure_FailureCode_name, Failure_FailureCode_value) + proto.RegisterEnum("routerrpc.HtlcEvent_EventType", HtlcEvent_EventType_name, HtlcEvent_EventType_value) proto.RegisterType((*SendPaymentRequest)(nil), "routerrpc.SendPaymentRequest") proto.RegisterMapType((map[uint64][]byte)(nil), "routerrpc.SendPaymentRequest.DestCustomRecordsEntry") proto.RegisterType((*TrackPaymentRequest)(nil), "routerrpc.TrackPaymentRequest") @@ -1524,144 +2042,188 @@ func init() { proto.RegisterType((*QueryProbabilityResponse)(nil), "routerrpc.QueryProbabilityResponse") proto.RegisterType((*BuildRouteRequest)(nil), "routerrpc.BuildRouteRequest") proto.RegisterType((*BuildRouteResponse)(nil), "routerrpc.BuildRouteResponse") + proto.RegisterType((*SubscribeHtlcEventsRequest)(nil), "routerrpc.SubscribeHtlcEventsRequest") + proto.RegisterType((*HtlcEvent)(nil), "routerrpc.HtlcEvent") + proto.RegisterType((*ForwardEvent)(nil), "routerrpc.ForwardEvent") + proto.RegisterType((*ForwardFailEvent)(nil), "routerrpc.ForwardFailEvent") + proto.RegisterType((*SettleEvent)(nil), "routerrpc.SettleEvent") + proto.RegisterType((*LinkFailEvent)(nil), "routerrpc.LinkFailEvent") } func init() { proto.RegisterFile("routerrpc/router.proto", fileDescriptor_7a0613f69d37b0a5) } var fileDescriptor_7a0613f69d37b0a5 = []byte{ - // 2102 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x58, 0xcb, 0x73, 0xdb, 0xc6, - 0x19, 0x0f, 0xc4, 0xf7, 0xc7, 0x17, 0xb4, 0x92, 0x65, 0x98, 0xb2, 0x62, 0x05, 0x76, 0x1d, 0x8e, - 0xc7, 0x91, 0x5c, 0xb5, 0xf1, 0x78, 0x7a, 0x68, 0x87, 0x22, 0xc1, 0x08, 0x32, 0x09, 0xca, 0x4b, - 0xd2, 0x89, 0x9b, 0xc3, 0x0e, 0x44, 0xae, 0x44, 0x8c, 0x40, 0x80, 0x01, 0x96, 0x8e, 0xf5, 0x0f, - 0xf4, 0xd4, 0xff, 0xa3, 0xbd, 0xb4, 0x97, 0x9e, 0xfb, 0xef, 0xb4, 0xf7, 0xde, 0x7a, 0xeb, 0xec, - 0x2e, 0x40, 0x82, 0x14, 0xe5, 0xf4, 0x44, 0xec, 0xef, 0x7b, 0xed, 0xee, 0xb7, 0xdf, 0x8b, 0xb0, - 0x17, 0xf8, 0x73, 0x46, 0x83, 0x60, 0x36, 0x3a, 0x96, 0x5f, 0x47, 0xb3, 0xc0, 0x67, 0x3e, 0x2a, - 0x2c, 0xf0, 0x5a, 0x21, 0x98, 0x8d, 0x24, 0xaa, 0xff, 0x37, 0x03, 0xa8, 0x4f, 0xbd, 0xf1, 0x85, - 0x7d, 0x3b, 0xa5, 0x1e, 0xc3, 0xf4, 0xa7, 0x39, 0x0d, 0x19, 0x42, 0x90, 0x1e, 0xd3, 0x90, 0x69, - 0xca, 0xa1, 0x52, 0x2f, 0x61, 0xf1, 0x8d, 0x54, 0x48, 0xd9, 0x53, 0xa6, 0x6d, 0x1d, 0x2a, 0xf5, - 0x14, 0xe6, 0x9f, 0xe8, 0x11, 0xe4, 0xed, 0x29, 0x23, 0xd3, 0xd0, 0x66, 0x5a, 0x49, 0xc0, 0x39, - 0x7b, 0xca, 0xba, 0xa1, 0xcd, 0xd0, 0x57, 0x50, 0x9a, 0x49, 0x95, 0x64, 0x62, 0x87, 0x13, 0x2d, - 0x25, 0x14, 0x15, 0x23, 0xec, 0xcc, 0x0e, 0x27, 0xa8, 0x0e, 0xea, 0x95, 0xe3, 0xd9, 0x2e, 0x19, - 0xb9, 0xec, 0x23, 0x19, 0x53, 0x97, 0xd9, 0x5a, 0xfa, 0x50, 0xa9, 0x67, 0x70, 0x45, 0xe0, 0x4d, - 0x97, 0x7d, 0x6c, 0x71, 0x14, 0x7d, 0x0d, 0xd5, 0x58, 0x59, 0x20, 0x37, 0xa8, 0x65, 0x0e, 0x95, - 0x7a, 0x01, 0x57, 0x66, 0xab, 0xdb, 0xfe, 0x1a, 0xaa, 0xcc, 0x99, 0x52, 0x7f, 0xce, 0x48, 0x48, - 0x47, 0xbe, 0x37, 0x0e, 0xb5, 0xac, 0xd4, 0x18, 0xc1, 0x7d, 0x89, 0x22, 0x1d, 0xca, 0x57, 0x94, - 0x12, 0xd7, 0x99, 0x3a, 0x8c, 0xf0, 0xed, 0xe7, 0xc4, 0xf6, 0x8b,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, 0xaf, 0x14, 0x74, 0x0e, 0xa5, 0xe4, 0xfc, 0x83, 0x92, 0xcd, 0xea, 0x86, - 0xc1, 0xe8, 0xb3, 0xba, 0xde, 0x82, 0x6a, 0x84, 0xcc, 0x99, 0xf2, 0xe6, 0x34, 0x1a, 0x17, 0x50, - 0x2d, 0xc1, 0xbf, 0x36, 0x83, 0xd4, 0xf6, 0x37, 0xd2, 0x22, 0x17, 0x76, 0xe4, 0x11, 0xa3, 0x86, - 0xfd, 0xce, 0x11, 0x57, 0xa7, 0x84, 0xda, 0x97, 0xf7, 0x91, 0x23, 0x6d, 0x63, 0xd8, 0xd9, 0x90, - 0xc0, 0xd1, 0xaf, 0x92, 0x3b, 0xb8, 0x37, 0xfd, 0xd7, 0x9e, 0xff, 0x12, 0xdb, 0xd2, 0xca, 0x86, - 0x4c, 0xbf, 0x62, 0xe5, 0xfe, 0x3a, 0xb1, 0x62, 0xe5, 0x73, 0x05, 0xe3, 0x47, 0x50, 0xd7, 0x33, - 0x01, 0xd2, 0xd7, 0x65, 0xef, 0x66, 0xa5, 0xda, 0xd3, 0xcf, 0xf2, 0x44, 0xca, 0x4d, 0x80, 0x65, - 0x3c, 0xa1, 0xc7, 0x09, 0x91, 0x3b, 0xf9, 0xa0, 0x76, 0x70, 0x0f, 0x55, 0xaa, 0x3a, 0xfd, 0xf5, - 0x1f, 0x8f, 0xaf, 0x1d, 0x36, 0x99, 0x5f, 0x1e, 0x8d, 0xfc, 0xe9, 0xb1, 0xcb, 0x5b, 0x7c, 0xcf, - 0xf1, 0xae, 0x3d, 0xca, 0x7e, 0xf6, 0x83, 0x9b, 0x63, 0xd7, 0x1b, 0x1f, 0x8b, 0xb0, 0x3c, 0x5e, - 0x68, 0xb9, 0xcc, 0x8a, 0x3f, 0xa4, 0x7e, 0xf3, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x10, 0xf6, - 0xab, 0x74, 0xc0, 0x12, 0x00, 0x00, + // 2719 bytes of a gzipped FileDescript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7e, 0xb7, 0xf5, 0x4d, 0xa2, 0xf6, 0x0d, 0xec, 0xf6, 0x3d, 0x6b, 0x78, 0xbd, + 0x72, 0xf7, 0x57, 0xaf, 0x6e, 0x62, 0xed, 0xea, 0xd6, 0xfe, 0x96, 0x80, 0x62, 0x20, 0xd5, 0xe3, + 0x16, 0x9f, 0xfb, 0xf8, 0x4b, 0x48, 0xfb, 0xdc, 0xe2, 0x4c, 0x72, 0x97, 0x8e, 0xef, 0x45, 0xfc, + 0x19, 0x61, 0x64, 0x44, 0x71, 0xe1, 0x2a, 0x64, 0x67, 0x1e, 0xb3, 0xa7, 0xd6, 0x55, 0x68, 0xd7, + 0x62, 0x8d, 0x6b, 0x90, 0x96, 0xc2, 0x32, 0x67, 0xf2, 0xc7, 0x85, 0x68, 0x58, 0x89, 0x22, 0xe1, + 0x23, 0x48, 0x8f, 0xf9, 0x64, 0xe8, 0x57, 0x52, 0x32, 0x7c, 0x38, 0xe0, 0x39, 0xed, 0xb7, 0x1b, + 0x75, 0xce, 0xd9, 0x74, 0xc6, 0x89, 0x62, 0xa8, 0x7d, 0x07, 0x65, 0x29, 0xd9, 0x62, 0xec, 0x63, + 0xc9, 0x7d, 0x0f, 0x44, 0xea, 0xca, 0x54, 0x50, 0x09, 0xbe, 0x6d, 0x4d, 0x45, 0x16, 0xd4, 0x46, + 0x80, 0x96, 0xf2, 0xfe, 0xcc, 0x75, 0x7c, 0xb1, 0x3b, 0x12, 0x66, 0x88, 0x2b, 0x2f, 0x32, 0x44, + 0xe6, 0x46, 0x42, 0x4a, 0x95, 0x02, 0xbc, 0xc5, 0x98, 0xcc, 0x8e, 0xc7, 0x2a, 0x21, 0xe9, 0xc4, + 0x1d, 0x5e, 0x8b, 0x14, 0xb7, 0x6e, 0x02, 0xf5, 0x45, 0x01, 0xb7, 0xdd, 0xe1, 0x75, 0x53, 0x80, + 0xb5, 0x1f, 0x55, 0x15, 0xea, 0xbb, 0xea, 0x94, 0xbf, 0x3a, 0x12, 0x4b, 0x67, 0x6d, 0xdd, 0xea, + 0xac, 0x1a, 0x85, 0xdd, 0x98, 0xf2, 0xe0, 0x14, 0xd1, 0x18, 0x24, 0x56, 0x62, 0xf0, 0x14, 0x32, + 0x97, 0x96, 0x3d, 0x99, 0x7b, 0xa1, 0x62, 0x1c, 0x09, 0x68, 0x4b, 0x51, 0x48, 0xc8, 0x52, 0xfb, + 0x73, 0x16, 0x32, 0x01, 0x88, 0x8f, 0x21, 0x35, 0x74, 0x47, 0xe1, 0x3d, 0xf8, 0x64, 0x5d, 0x2c, + 0xfc, 0xbf, 0xe1, 0x8e, 0x18, 0x91, 0xbc, 0xf8, 0x7b, 0x28, 0x89, 0xd2, 0xe1, 0xb0, 0x09, 0x9d, + 0xcf, 0x46, 0xd6, 0x22, 0xf4, 0x95, 0x88, 0x74, 0x43, 0x31, 0x0c, 0x24, 0x9d, 0x14, 0x87, 0xd1, + 0x25, 0x3e, 0x80, 0x9c, 0x88, 0xb6, 0x8a, 0x44, 0x4a, 0xde, 0xfd, 0xac, 0x00, 0x64, 0x0c, 0x6a, + 0x50, 0x74, 0x1d, 0xdb, 0x75, 0xa8, 0x3f, 0xb6, 0xe8, 0xf1, 0x57, 0x5f, 0xcb, 0xda, 0x59, 0x20, + 0x79, 0x09, 0xf6, 0xc6, 0xd6, 0xf1, 0x57, 0x5f, 0xe3, 0x4f, 0x21, 0x2f, 0xeb, 0x0d, 0xfb, 0x30, + 0xb3, 0xbd, 0x1b, 0x59, 0x34, 0x8b, 0x44, 0x96, 0x20, 0x4d, 0x22, 0x22, 0x8b, 0x2e, 0x27, 0xd6, + 0x95, 0x2f, 0x0b, 0x65, 0x91, 0xa8, 0x05, 0x7e, 0x01, 0x7b, 0x81, 0x0f, 0xa8, 0xef, 0xce, 0xbd, + 0x21, 0xa3, 0xb6, 0x33, 0x62, 0x1f, 0x64, 0x01, 0x2c, 0x12, 0x1c, 0xd0, 0x7a, 0x92, 0xa4, 0x0b, + 0x0a, 0xde, 0x87, 0x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d0, 0x06, 0xb4, + 0xd5, 0x11, 0x83, 0x8f, 0x3e, 0x6b, 0x47, 0x8c, 0x7f, 0x69, 0xaa, 0x7e, 0x72, 0x1b, 0x39, 0xd0, + 0x36, 0x82, 0xdd, 0x0d, 0x43, 0x00, 0xfe, 0xbf, 0xa8, 0x05, 0xb7, 0x8e, 0x10, 0xd5, 0xc7, 0xbf, + 0xc4, 0xb6, 0xdc, 0x65, 0xc3, 0xb4, 0x10, 0xdb, 0xe5, 0xf6, 0x59, 0x23, 0xb6, 0xcb, 0xc7, 0x86, + 0x8e, 0x1f, 0x01, 0xad, 0x76, 0x93, 0xb8, 0xb6, 0x2a, 0xbb, 0xde, 0xd9, 0x56, 0x3f, 0xff, 0x28, + 0x4f, 0xa0, 0x5c, 0x07, 0x58, 0xf6, 0x64, 0xf8, 0x41, 0x44, 0x64, 0xad, 0xa7, 0xac, 0x3e, 0xbc, + 0x85, 0x1a, 0xa8, 0xea, 0xc3, 0xee, 0x86, 0x26, 0x2d, 0xe6, 0x8d, 0xdb, 0x9b, 0xb8, 0xea, 0xde, + 0xa6, 0xe6, 0xe0, 0x45, 0xe2, 0xe4, 0xff, 0xff, 0xf0, 0xfc, 0xca, 0xe6, 0xe3, 0xf9, 0xc5, 0xb3, + 0xa1, 0x3b, 0x7d, 0x3e, 0xb1, 0xaf, 0xc6, 0xdc, 0xb1, 0x9d, 0x2b, 0x87, 0xf1, 0xf7, 0xae, 0x77, + 0xfd, 0x7c, 0xe2, 0x8c, 0x9e, 0xcb, 0x86, 0xf1, 0xf9, 0x42, 0xfc, 0x62, 0x5b, 0xfe, 0xa9, 0xe4, + 0x37, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x78, 0xcd, 0x6f, 0x28, 0x5a, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1711,6 +2273,10 @@ type RouterClient interface { //keys. It retrieves the relevant channel policies from the graph in order to //calculate the correct fees and time locks. BuildRoute(ctx context.Context, in *BuildRouteRequest, opts ...grpc.CallOption) (*BuildRouteResponse, error) + //* + //SubscribeHtlcEvents creates a uni-directional stream from the server to + //the client which delivers a stream of htlc events. + SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error) } type routerClient struct { @@ -1839,6 +2405,38 @@ func (c *routerClient) BuildRoute(ctx context.Context, in *BuildRouteRequest, op return out, nil } +func (c *routerClient) SubscribeHtlcEvents(ctx context.Context, in *SubscribeHtlcEventsRequest, opts ...grpc.CallOption) (Router_SubscribeHtlcEventsClient, error) { + stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[2], "/routerrpc.Router/SubscribeHtlcEvents", opts...) + if err != nil { + return nil, err + } + x := &routerSubscribeHtlcEventsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Router_SubscribeHtlcEventsClient interface { + Recv() (*HtlcEvent, error) + grpc.ClientStream +} + +type routerSubscribeHtlcEventsClient struct { + grpc.ClientStream +} + +func (x *routerSubscribeHtlcEventsClient) Recv() (*HtlcEvent, error) { + m := new(HtlcEvent) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // RouterServer is the server API for Router service. type RouterServer interface { //* @@ -1876,6 +2474,10 @@ type RouterServer interface { //keys. It retrieves the relevant channel policies from the graph in order to //calculate the correct fees and time locks. BuildRoute(context.Context, *BuildRouteRequest) (*BuildRouteResponse, error) + //* + //SubscribeHtlcEvents creates a uni-directional stream from the server to + //the client which delivers a stream of htlc events. + SubscribeHtlcEvents(*SubscribeHtlcEventsRequest, Router_SubscribeHtlcEventsServer) error } func RegisterRouterServer(s *grpc.Server, srv RouterServer) { @@ -2032,6 +2634,27 @@ func _Router_BuildRoute_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Router_SubscribeHtlcEvents_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeHtlcEventsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RouterServer).SubscribeHtlcEvents(m, &routerSubscribeHtlcEventsServer{stream}) +} + +type Router_SubscribeHtlcEventsServer interface { + Send(*HtlcEvent) error + grpc.ServerStream +} + +type routerSubscribeHtlcEventsServer struct { + grpc.ServerStream +} + +func (x *routerSubscribeHtlcEventsServer) Send(m *HtlcEvent) error { + return x.ServerStream.SendMsg(m) +} + var _Router_serviceDesc = grpc.ServiceDesc{ ServiceName: "routerrpc.Router", HandlerType: (*RouterServer)(nil), @@ -2072,6 +2695,11 @@ var _Router_serviceDesc = grpc.ServiceDesc{ Handler: _Router_TrackPayment_Handler, ServerStreams: true, }, + { + StreamName: "SubscribeHtlcEvents", + Handler: _Router_SubscribeHtlcEvents_Handler, + ServerStreams: true, + }, }, Metadata: "routerrpc/router.proto", } diff --git a/lnrpc/routerrpc/router.proto b/lnrpc/routerrpc/router.proto index bc5ad74d62c1..9139391c3b3b 100644 --- a/lnrpc/routerrpc/router.proto +++ b/lnrpc/routerrpc/router.proto @@ -490,6 +490,120 @@ message BuildRouteResponse { lnrpc.Route route = 1; } + +message SubscribeHtlcEventsRequest{} + +message HtlcEvent{ + /** + IncomingChannel is the channel that the incoming htlc arrived at our node + on. This value is zero for sends. + */ + uint64 incoming_channel = 1 [json_name="incoming_channel"]; + + /** + Outgoing channel is the channel that the outgoing htlc left our node on. + This value is zero for receives. + */ + uint64 outgoing_channel = 2 [json_name="outgoing_channel"]; + + /** + Incoming id is the index of the incoming htlc in the incoming channel. + This value is zero for sends. + */ + uint64 incoming_htlc_id = 3 [json_name="incoming_htlc_id"]; + + /** + Outgoing id is the index of the outgoing htlc in the outgoing channel. + This value is zero for receives. + */ + uint64 outgoing_htlc_id = 4 [json_name="outgoing_htlc_id"]; + + // The timelock on the incoming htlc. + uint32 incoming_timelock = 5 [json_name="incoming_timelock"]; + + // The timelock on the outgoing htlc. + uint32 outgoing_timelock = 6 [json_name="outgoing_timelock"]; + + // The amount of the incoming htlc. + uint64 incoming_amt_msat = 7 [json_name="incoming_amt_msat"]; + + // The amount of the outgoing htlc. + uint64 outgoing_amt_msat = 8 [json_name ="outgoing_amt_msat"]; + + /** + Timestamp is the time (unix epoch offset in seconds) that the event + occurred. + */ + uint64 timestamp = 9 [json_name="timestamp"]; + + enum EventType{ + UNKNOWN = 0; + SEND = 1; + RECEIVE = 2; + FORWARD = 3; + } + + /** + The event type indicates whether the htlc was part of a send, receive or + forward. + */ + EventType event_type = 10 [json_name ="event_type"]; + + oneof event { + ForwardEvent forward_event = 11 [json_name = "forward_event"]; + ForwardFailEvent forward_fail_event = 12 [json_name = "forward_fail_event"]; + SettleEvent settle_event = 13 [json_name = "settle_event"]; + LinkFailEvent link_fail_event = 14 [json_name= "link_fail_event"]; + } +} + +message ForwardEvent{} + +message ForwardFailEvent{} + +message SettleEvent{} + +message LinkFailEvent{ + // FailureCode is the BOLT error code for the failure. + Failure.FailureCode wire_failure = 1 [json_name = "wire_failure"]; + + /** + FailureDetail provides additional information about the reason for the + failure. This detail enriches the information provided by the wire message + and may be 'no detail' if the wire message requires no additional metadata. + */ + FailureDetail failure_detail = 2 [json_name = "failure_detail"]; + + // A string representation of the link failure. + string failure_string = 3 [json_name = "failure_string"]; +} + +enum FailureDetail { + UNKNOWN = 0; + NO_DETAIL = 1; + ONION_DECODE = 2; + LINK_NOT_ELIGIBLE = 3; + ON_CHAIN_TIMEOUT = 4; + HTLC_EXCEEDS_MAX = 5; + INSUFFICIENT_BALANCE =6; + INCOMPLETE_FORWARD = 7; + HTLC_ADD_FAILED = 8; + FORWARDS_DISABLED = 9; + INVOICE_CANCELED = 10; + INVOICE_UNDERPAID = 11; + INVOICE_EXPIRY_TOO_SOON = 12; + INVOICE_NOT_OPEN = 13; + MPP_INVOICE_TIMEOUT = 14; + ADDRESS_MISMATCH = 15; + SET_TOTAL_MISMATCH = 16; + SET_TOTAL_TOO_LOW = 17; + SET_OVERPAID = 18; + UNKNOWN_INVOICE = 19; + INVALID_KEYSEND = 20; + MPP_IN_PROGRESS = 21; + CIRCULAR_ROUTE = 22; +} + service Router { /** SendPayment attempts to route a payment described by the passed @@ -542,4 +656,10 @@ service Router { calculate the correct fees and time locks. */ rpc BuildRoute(BuildRouteRequest) returns (BuildRouteResponse); + + /** + SubscribeHtlcEvents creates a uni-directional stream from the server to + the client which delivers a stream of htlc events. + */ + rpc SubscribeHtlcEvents (SubscribeHtlcEventsRequest) returns (stream HtlcEvent); } diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go index 4802902e36a1..e85aa2d324c7 100644 --- a/lnrpc/routerrpc/router_backend.go +++ b/lnrpc/routerrpc/router_backend.go @@ -19,6 +19,7 @@ import ( "github.com/lightningnetwork/lnd/record" "github.com/lightningnetwork/lnd/routing" "github.com/lightningnetwork/lnd/routing/route" + "github.com/lightningnetwork/lnd/subscribe" "github.com/lightningnetwork/lnd/zpay32" ) @@ -67,6 +68,10 @@ type RouterBackend struct { // DefaultFinalCltvDelta is the default value used as final cltv delta // when an RPC caller doesn't specify a value. DefaultFinalCltvDelta uint16 + + // SubscribeHtlcEvents returns a subscription client for the node's + // htlc events. + SubscribeHtlcEvents func() (*subscribe.Client, error) } // MissionControl defines the mission control dependencies of routerrpc. diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index a1b7948c100e..d8ef5f7752ed 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -80,6 +80,10 @@ var ( Entity: "offchain", Action: "read", }}, + "/routerrpc.Router/SubscribeHtlcEvents": {{ + Entity: "offchain", + Action: "read", + }}, } // DefaultRouterMacFilename is the default name of the router macaroon @@ -92,6 +96,8 @@ var ( // allows clients to route arbitrary payment through the Lightning Network. type Server struct { cfg *Config + + quit chan struct{} } // A compile time check to ensure that Server fully implements the RouterServer @@ -151,7 +157,8 @@ func New(cfg *Config) (*Server, lnrpc.MacaroonPerms, error) { } routerServer := &Server{ - cfg: cfg, + cfg: cfg, + quit: make(chan struct{}), } return routerServer, macPermissions, nil @@ -168,6 +175,7 @@ func (s *Server) Start() error { // // NOTE: This is part of the lnrpc.SubServer interface. func (s *Server) Stop() error { + close(s.quit) return nil } @@ -743,3 +751,38 @@ func (s *Server) BuildRoute(ctx context.Context, return routeResp, nil } + +// SubscribeHtlcEvents creates a uni-directional stream from the server to +// the client which delivers a stream of htlc events. +func (s *Server) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest, + stream Router_SubscribeHtlcEventsServer) error { + + htlcClient, err := s.cfg.RouterBackend.SubscribeHtlcEvents() + if err != nil { + return err + } + defer htlcClient.Cancel() + + for { + select { + case event := <-htlcClient.Updates(): + htlcEvent, ok := event.(htlcswitch.HtlcEvent) + if !ok { + return fmt.Errorf("unexpected event type: %T", + event) + } + + rpcEvent, err := rpcHtlcEvent(htlcEvent) + if err != nil { + return err + } + + if err := stream.Send(rpcEvent); err != nil { + return err + } + + case <-s.quit: + return errors.New("server shutting down") + } + } +} diff --git a/lnrpc/routerrpc/subscribe_events.go b/lnrpc/routerrpc/subscribe_events.go new file mode 100644 index 000000000000..ca4ce4c13be2 --- /dev/null +++ b/lnrpc/routerrpc/subscribe_events.go @@ -0,0 +1,214 @@ +// +build routerrpc + +package routerrpc + +import ( + "fmt" + + "github.com/lightningnetwork/lnd/htlcswitch" + "github.com/lightningnetwork/lnd/invoices" +) + +// rpcHtlcEvent returns a rpc htlc event from a htlcswitch event. +func rpcHtlcEvent(htlcEvent htlcswitch.HtlcEvent) (*HtlcEvent, error) { + key := htlcEvent.Key() + + rpcEvent := &HtlcEvent{ + IncomingChannel: key.IncomingCircuit.ChanID.ToUint64(), + OutgoingChannel: key.OutgoingCircuit.ChanID.ToUint64(), + IncomingHtlcId: key.IncomingCircuit.HtlcID, + OutgoingHtlcId: key.OutgoingCircuit.HtlcID, + Timestamp: uint64(htlcEvent.Timestamp().Unix()), + } + + switch e := htlcEvent.(type) { + case *htlcswitch.ForwardingEvent: + rpcEvent.IncomingTimelock = e.HtlcInfo.IncomingTimeLock + rpcEvent.OutgoingTimelock = e.HtlcInfo.OutgoingTimeLock + rpcEvent.IncomingAmtMsat = uint64(e.HtlcInfo.IncomingAmt) + rpcEvent.OutgoingAmtMsat = uint64(e.HtlcInfo.OutgoingAmt) + + rpcEvent.Event = &HtlcEvent_ForwardEvent{ + ForwardEvent: &ForwardEvent{}, + } + + case *htlcswitch.ForwardingFailEvent: + rpcEvent.Event = &HtlcEvent_ForwardFailEvent{ + ForwardFailEvent: &ForwardFailEvent{}, + } + + case *htlcswitch.LinkFailEvent: + rpcEvent.IncomingTimelock = e.HtlcInfo.IncomingTimeLock + rpcEvent.OutgoingTimelock = e.HtlcInfo.OutgoingTimeLock + rpcEvent.IncomingAmtMsat = uint64(e.HtlcInfo.IncomingAmt) + rpcEvent.OutgoingAmtMsat = uint64(e.HtlcInfo.OutgoingAmt) + + failureCode, failReason, err := rpcFailReason( + e.LinkError, + ) + if err != nil { + return nil, err + } + + rpcEvent.Event = &HtlcEvent_LinkFailEvent{ + LinkFailEvent: &LinkFailEvent{ + WireFailure: failureCode, + FailureDetail: failReason, + FailureString: e.LinkError.Error(), + }, + } + + case *htlcswitch.SettleEvent: + rpcEvent.Event = &HtlcEvent_SettleEvent{ + SettleEvent: &SettleEvent{}, + } + + default: + return nil, fmt.Errorf("unknown event type: %T", e) + } + + // Convert the htlc event type to a rpc event. + switch htlcEvent.EventType() { + case htlcswitch.HtlcEventTypeSend: + rpcEvent.EventType = HtlcEvent_SEND + + case htlcswitch.HtlcEventTypeReceive: + rpcEvent.EventType = HtlcEvent_RECEIVE + + case htlcswitch.HtlcEventTypeForward: + rpcEvent.EventType = HtlcEvent_FORWARD + + default: + return nil, fmt.Errorf("unknown event type: %v", + htlcEvent.EventType()) + } + + return rpcEvent, nil +} + +// rpcFailReason maps a lnwire failure message and failure detail to a rpc +// failure code and detail. +func rpcFailReason(linkErr *htlcswitch.LinkError) (Failure_FailureCode, + FailureDetail, error) { + + wireErr, err := marshallError(linkErr) + if err != nil { + return 0, 0, err + } + + switch failureDetail := linkErr.FailureDetail.(type) { + case invoices.FailResolutionResult: + fd, err := rpcFailureResolution(failureDetail) + return wireErr.GetCode(), fd, err + + case htlcswitch.OutgoingFailure: + fd, err := rpcOutgoingFailure(failureDetail) + return wireErr.GetCode(), fd, err + + default: + return 0, 0, fmt.Errorf("unknown failure "+ + "detail type: %T", linkErr.FailureDetail) + + } + +} + +// rpcFailureResolution maps an invoice failure resolution to a rpc failure +// detail. Invoice failures have no zero resolution results (every failure +// is accompanied with a result), so we error if we fail to match the result +// type. +func rpcFailureResolution(invoiceFailure invoices.FailResolutionResult) ( + FailureDetail, error) { + + switch invoiceFailure { + case invoices.ResultReplayToCanceled: + return FailureDetail_INVOICE_CANCELED, nil + + case invoices.ResultInvoiceAlreadyCanceled: + return FailureDetail_INVOICE_CANCELED, nil + + case invoices.ResultAmountTooLow: + return FailureDetail_INVOICE_UNDERPAID, nil + + case invoices.ResultExpiryTooSoon: + return FailureDetail_INVOICE_EXPIRY_TOO_SOON, nil + + case invoices.ResultCanceled: + return FailureDetail_INVOICE_CANCELED, nil + + case invoices.ResultInvoiceNotOpen: + return FailureDetail_INVOICE_NOT_OPEN, nil + + case invoices.ResultMppTimeout: + return FailureDetail_MPP_INVOICE_TIMEOUT, nil + + case invoices.ResultAddressMismatch: + return FailureDetail_ADDRESS_MISMATCH, nil + + case invoices.ResultHtlcSetTotalMismatch: + return FailureDetail_SET_TOTAL_MISMATCH, nil + + case invoices.ResultHtlcSetTotalTooLow: + return FailureDetail_SET_TOTAL_TOO_LOW, nil + + case invoices.ResultHtlcSetOverpayment: + return FailureDetail_SET_OVERPAID, nil + + case invoices.ResultInvoiceNotFound: + return FailureDetail_UNKNOWN_INVOICE, nil + + case invoices.ResultKeySendError: + return FailureDetail_INVALID_KEYSEND, nil + + case invoices.ResultMppInProgress: + return FailureDetail_MPP_IN_PROGRESS, nil + + default: + return 0, fmt.Errorf("unknown fail resolution: %v", + invoiceFailure.FailureString()) + } +} + +// rpcOutgoingFailure maps an outgoing failure to a rpc FailureDetail. If the +// failure detail is FailureDetailNone, which indicates that the failure was +// a wire message which required no further failure detail, we return a no +// detail failure detail to indicate that there was no additional information. +func rpcOutgoingFailure(failureDetail htlcswitch.OutgoingFailure) ( + FailureDetail, error) { + + switch failureDetail { + case htlcswitch.OutgoingFailureNone: + return FailureDetail_NO_DETAIL, nil + + case htlcswitch.OutgoingFailureDecodeError: + return FailureDetail_ONION_DECODE, nil + + case htlcswitch.OutgoingFailureLinkNotEligible: + return FailureDetail_LINK_NOT_ELIGIBLE, nil + + case htlcswitch.OutgoingFailureOnChainTimeout: + return FailureDetail_ON_CHAIN_TIMEOUT, nil + + case htlcswitch.OutgoingFailureHTLCExceedsMax: + return FailureDetail_HTLC_EXCEEDS_MAX, nil + + case htlcswitch.OutgoingFailureInsufficientBalance: + return FailureDetail_INSUFFICIENT_BALANCE, nil + + case htlcswitch.OutgoingFailureCircularRoute: + return FailureDetail_CIRCULAR_ROUTE, nil + + case htlcswitch.OutgoingFailureIncompleteForward: + return FailureDetail_INCOMPLETE_FORWARD, nil + + case htlcswitch.OutgoingFailureDownstreamHtlcAdd: + return FailureDetail_HTLC_ADD_FAILED, nil + + case htlcswitch.OutgoingFailureForwardsDisabled: + return FailureDetail_FORWARDS_DISABLED, nil + + default: + return 0, fmt.Errorf("unknown outgoing failure "+ + "detail: %v", failureDetail.FailureString()) + } +} diff --git a/rpcserver.go b/rpcserver.go index a653741ef7b3..c71519b12e13 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -567,6 +567,7 @@ func newRPCServer(s *server, macService *macaroons.Service, Tower: s.controlTower, MaxTotalTimelock: cfg.MaxOutgoingCltvExpiry, DefaultFinalCltvDelta: uint16(cfg.Bitcoin.TimeLockDelta), + SubscribeHtlcEvents: s.htlcNotifier.SubscribeHtlcEvents, } genInvoiceFeatures := func() *lnwire.FeatureVector {