From a9849bb317f8b5189e179992451e34e3ca3cfa3f Mon Sep 17 00:00:00 2001 From: carla Date: Thu, 30 Jul 2020 09:09:27 +0200 Subject: [PATCH] multi: add failure reason to swap client server To provide more information about swaps, we add a failure reason field to our swaps. We do not extend our existing state enum to remain backwards compatible. --- cmd/loop/main.go | 10 +- loopd/swapclient_server.go | 42 +++++- looprpc/client.pb.go | 294 +++++++++++++++++++++++------------- looprpc/client.proto | 58 ++++++- looprpc/client.swagger.json | 18 +++ 5 files changed, 310 insertions(+), 112 deletions(-) diff --git a/cmd/loop/main.go b/cmd/loop/main.go index 731aa97..0a27b1b 100644 --- a/cmd/loop/main.go +++ b/cmd/loop/main.go @@ -277,16 +277,22 @@ func parseAmt(text string) (btcutil.Amount, error) { } func logSwap(swap *looprpc.SwapStatus) { + // If our swap failed, we add our failure reason to the state. + swapState := fmt.Sprintf("%v", swap.State) + if swap.State == looprpc.SwapState_FAILED { + swapState = fmt.Sprintf("%v (%v)", swapState, swap.FailureReason) + } + if swap.Type == looprpc.SwapType_LOOP_OUT { fmt.Printf("%v %v %v %v - %v", time.Unix(0, swap.LastUpdateTime).Format(time.RFC3339), - swap.Type, swap.State, btcutil.Amount(swap.Amt), + swap.Type, swapState, btcutil.Amount(swap.Amt), swap.HtlcAddressP2Wsh, ) } else { fmt.Printf("%v %v %v %v -", time.Unix(0, swap.LastUpdateTime).Format(time.RFC3339), - swap.Type, swap.State, btcutil.Amount(swap.Amt)) + swap.Type, swapState, btcutil.Amount(swap.Amt)) if swap.HtlcAddressP2Wsh != "" { fmt.Printf(" P2WSH: %v", swap.HtlcAddressP2Wsh) } diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 2720af6..74c2d75 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -121,20 +121,57 @@ func (s *swapClientServer) LoopOut(ctx context.Context, func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) ( *looprpc.SwapStatus, error) { - var state looprpc.SwapState + var ( + state looprpc.SwapState + failureReason = looprpc.FailureReason_FAILURE_REASON_NONE + ) + + // Set our state var for non-failure states. If we get a failure, we + // will update our failure reason. To remain backwards compatible with + // previous versions where we squashed all failure reasons to a single + // failure state, we set a failure reason for all our different failure + // states, and set our failed state for all of them. switch loopSwap.State { case loopdb.StateInitiated: state = looprpc.SwapState_INITIATED + case loopdb.StatePreimageRevealed: state = looprpc.SwapState_PREIMAGE_REVEALED + case loopdb.StateHtlcPublished: state = looprpc.SwapState_HTLC_PUBLISHED + case loopdb.StateInvoiceSettled: state = looprpc.SwapState_INVOICE_SETTLED + case loopdb.StateSuccess: state = looprpc.SwapState_SUCCESS + + case loopdb.StateFailOffchainPayments: + failureReason = looprpc.FailureReason_FAILURE_REASON_OFFCHAIN + + case loopdb.StateFailTimeout: + failureReason = looprpc.FailureReason_FAILURE_REASON_TIMEOUT + + case loopdb.StateFailSweepTimeout: + failureReason = looprpc.FailureReason_FAILURE_REASON_SWEEP_TIMEOUT + + case loopdb.StateFailInsufficientValue: + failureReason = looprpc.FailureReason_FAILURE_REASON_INSUFFICIENT_VALUE + + case loopdb.StateFailTemporary: + failureReason = looprpc.FailureReason_FAILURE_REASON_TEMPORARY + + case loopdb.StateFailIncorrectHtlcAmt: + failureReason = looprpc.FailureReason_FAILURE_REASON_INCORRECT_AMOUNT + default: - // Return less granular status over rpc. + return nil, fmt.Errorf("unknown swap state: %v", loopSwap.State) + } + + // If we have a failure reason, we have a failure state, so should use + // our catchall failed state. + if failureReason != looprpc.FailureReason_FAILURE_REASON_NONE { state = looprpc.SwapState_FAILED } @@ -167,6 +204,7 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) ( Id: loopSwap.SwapHash.String(), IdBytes: loopSwap.SwapHash[:], State: state, + FailureReason: failureReason, InitiationTime: loopSwap.InitiationTime.UnixNano(), LastUpdateTime: loopSwap.LastUpdate.UnixNano(), HtlcAddress: htlcAddress, diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index d6bcd14..6d4bc06 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -111,6 +111,70 @@ func (SwapState) EnumDescriptor() ([]byte, []int) { return fileDescriptor_014de31d7ac8c57c, []int{1} } +type FailureReason int32 + +const ( + // + //FAILURE_REASON_NONE is set when the swap did not fail, it is either in + //progress or succeeded. + FailureReason_FAILURE_REASON_NONE FailureReason = 0 + // + //FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't + //possible to find a route for one or both off chain payments that met the fee + //and timelock limits required. + FailureReason_FAILURE_REASON_OFFCHAIN FailureReason = 1 + // + //FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc + //did not confirm before its expiry, or it confirmed too late for us to reveal + //our preimage and claim. + FailureReason_FAILURE_REASON_TIMEOUT FailureReason = 2 + // + //FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed + //because the on chain htlc wasn't swept before the server revoked the + //htlc. + FailureReason_FAILURE_REASON_SWEEP_TIMEOUT FailureReason = 3 + // + //FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed + //because the on chain htlc had a lower value than requested. + FailureReason_FAILURE_REASON_INSUFFICIENT_VALUE FailureReason = 4 + // + //FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an + //internal error. Manual intervention such as a restart is required. + FailureReason_FAILURE_REASON_TEMPORARY FailureReason = 5 + // + //FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed + //because the amount extended by an external loop in htlc is insufficient. + FailureReason_FAILURE_REASON_INCORRECT_AMOUNT FailureReason = 6 +) + +var FailureReason_name = map[int32]string{ + 0: "FAILURE_REASON_NONE", + 1: "FAILURE_REASON_OFFCHAIN", + 2: "FAILURE_REASON_TIMEOUT", + 3: "FAILURE_REASON_SWEEP_TIMEOUT", + 4: "FAILURE_REASON_INSUFFICIENT_VALUE", + 5: "FAILURE_REASON_TEMPORARY", + 6: "FAILURE_REASON_INCORRECT_AMOUNT", +} + +var FailureReason_value = map[string]int32{ + "FAILURE_REASON_NONE": 0, + "FAILURE_REASON_OFFCHAIN": 1, + "FAILURE_REASON_TIMEOUT": 2, + "FAILURE_REASON_SWEEP_TIMEOUT": 3, + "FAILURE_REASON_INSUFFICIENT_VALUE": 4, + "FAILURE_REASON_TEMPORARY": 5, + "FAILURE_REASON_INCORRECT_AMOUNT": 6, +} + +func (x FailureReason) String() string { + return proto.EnumName(FailureReason_name, int32(x)) +} + +func (FailureReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_014de31d7ac8c57c, []int{2} +} + type LoopOutRequest struct { //* //Requested swap amount in sat. This does not include the swap and miner fee. @@ -540,6 +604,9 @@ type SwapStatus struct { //* //State the swap is currently in, see State enum. State SwapState `protobuf:"varint,4,opt,name=state,proto3,enum=looprpc.SwapState" json:"state,omitempty"` + // + //A failure reason for the swap, only set if the swap has failed. + FailureReason FailureReason `protobuf:"varint,14,opt,name=failure_reason,json=failureReason,proto3,enum=looprpc.FailureReason" json:"failure_reason,omitempty"` //* //Initiation time of the swap. InitiationTime int64 `protobuf:"varint,5,opt,name=initiation_time,json=initiationTime,proto3" json:"initiation_time,omitempty"` @@ -631,6 +698,13 @@ func (m *SwapStatus) GetState() SwapState { return SwapState_INITIATED } +func (m *SwapStatus) GetFailureReason() FailureReason { + if m != nil { + return m.FailureReason + } + return FailureReason_FAILURE_REASON_NONE +} + func (m *SwapStatus) GetInitiationTime() int64 { if m != nil { return m.InitiationTime @@ -1370,6 +1444,7 @@ func (m *LsatToken) GetStorageName() string { func init() { proto.RegisterEnum("looprpc.SwapType", SwapType_name, SwapType_value) proto.RegisterEnum("looprpc.SwapState", SwapState_name, SwapState_value) + proto.RegisterEnum("looprpc.FailureReason", FailureReason_name, FailureReason_value) proto.RegisterType((*LoopOutRequest)(nil), "looprpc.LoopOutRequest") proto.RegisterType((*LoopInRequest)(nil), "looprpc.LoopInRequest") proto.RegisterType((*SwapResponse)(nil), "looprpc.SwapResponse") @@ -1392,111 +1467,120 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 1651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdd, 0x6e, 0x23, 0x49, - 0x15, 0xde, 0xf6, 0x4f, 0x6c, 0x1f, 0xb7, 0xdb, 0x9d, 0xca, 0xce, 0xc4, 0xb1, 0x40, 0xeb, 0x69, - 0x76, 0x20, 0x1b, 0x56, 0x63, 0x36, 0x7b, 0xc5, 0x0a, 0x21, 0x65, 0x1c, 0xef, 0xc6, 0x51, 0x7e, - 0x4c, 0xdb, 0x59, 0x09, 0x84, 0xd4, 0xaa, 0xd8, 0x95, 0xb8, 0x85, 0xbb, 0xab, 0xb7, 0xab, 0x3c, - 0x93, 0x68, 0x85, 0x90, 0x78, 0x01, 0x2e, 0x78, 0x03, 0x5e, 0x83, 0x37, 0x40, 0xdc, 0x00, 0x0f, - 0xc0, 0x0d, 0x37, 0xbc, 0x04, 0x42, 0x75, 0xaa, 0xbb, 0xdd, 0x9d, 0x38, 0x41, 0x5c, 0xec, 0x9d, - 0xfb, 0xab, 0xaf, 0x4e, 0x9d, 0x9f, 0x3a, 0xe7, 0x2b, 0x83, 0x39, 0x5b, 0xfa, 0x2c, 0x94, 0x6f, - 0xa2, 0x98, 0x4b, 0x4e, 0x6a, 0x4b, 0xce, 0xa3, 0x38, 0x9a, 0x75, 0xbf, 0x77, 0xcb, 0xf9, 0xed, - 0x92, 0xf5, 0x69, 0xe4, 0xf7, 0x69, 0x18, 0x72, 0x49, 0xa5, 0xcf, 0x43, 0xa1, 0x69, 0xce, 0x5f, - 0xca, 0x60, 0x9d, 0x71, 0x1e, 0x5d, 0xae, 0xa4, 0xcb, 0xbe, 0x59, 0x31, 0x21, 0x89, 0x0d, 0x65, - 0x1a, 0xc8, 0x8e, 0xd1, 0x33, 0xf6, 0xcb, 0xae, 0xf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, 0x36, 0x1e, 0x21, 0xa8, 0xec, 0xeb, 0xd1, 0x7a, 0xbd, - 0x85, 0x7f, 0x8a, 0x3f, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0x1f, 0xc0, 0xa6, 0x4b, - 0x0f, 0x00, 0x00, + // 1803 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdd, 0x6e, 0x23, 0x49, + 0x15, 0x1e, 0xff, 0xc5, 0xf6, 0x71, 0xbb, 0xdd, 0xa9, 0xec, 0x24, 0x8e, 0x19, 0x34, 0x9e, 0xde, + 0x1d, 0xc8, 0x86, 0xd5, 0x98, 0xcd, 0x5e, 0xb1, 0x02, 0x24, 0x8f, 0xd3, 0xd9, 0x38, 0x4a, 0x6c, + 0xd3, 0x76, 0x06, 0x2d, 0x42, 0x6a, 0x55, 0xec, 0x4a, 0xdc, 0xc2, 0xfd, 0xb3, 0x5d, 0xe5, 0x99, + 0x44, 0x2b, 0x84, 0xc4, 0x0b, 0x70, 0xc1, 0x3d, 0x17, 0xbc, 0x06, 0x6f, 0x80, 0xb8, 0x01, 0x5e, + 0x81, 0x1b, 0x2e, 0x78, 0x05, 0x84, 0xea, 0x54, 0xbb, 0xdd, 0xed, 0xfc, 0x20, 0x2e, 0xb8, 0x4b, + 0x7f, 0xe7, 0xab, 0x53, 0xe7, 0xa7, 0xce, 0x8f, 0x03, 0xda, 0x74, 0xe1, 0x32, 0x5f, 0xbc, 0x09, + 0xa3, 0x40, 0x04, 0xa4, 0xbc, 0x08, 0x82, 0x30, 0x0a, 0xa7, 0xad, 0x17, 0x37, 0x41, 0x70, 0xb3, + 0x60, 0x1d, 0x1a, 0xba, 0x1d, 0xea, 0xfb, 0x81, 0xa0, 0xc2, 0x0d, 0x7c, 0xae, 0x68, 0xe6, 0x9f, + 0x0b, 0xa0, 0x9f, 0x07, 0x41, 0x38, 0x5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x02, 0x00, + 0x00, 0xff, 0xff, 0xbf, 0xed, 0xab, 0x0a, 0x7a, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/looprpc/client.proto b/looprpc/client.proto index ba84cda..02eda34 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -311,6 +311,11 @@ message SwapStatus { */ SwapState state = 4; + /* + A failure reason for the swap, only set if the swap has failed. + */ + FailureReason failure_reason = 14; + /** Initiation time of the swap. */ @@ -392,12 +397,59 @@ enum SwapState { FAILED = 4; /** - INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been - paid, but we are still waiting for the htlc spend to confirm. - */ + INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been + paid, but we are still waiting for the htlc spend to confirm. + */ INVOICE_SETTLED = 5; } +enum FailureReason{ + /* + FAILURE_REASON_NONE is set when the swap did not fail, it is either in + progress or succeeded. + */ + FAILURE_REASON_NONE = 0; + + /* + FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't + possible to find a route for one or both off chain payments that met the fee + and timelock limits required. + */ + FAILURE_REASON_OFFCHAIN = 1; + + /* + FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc + did not confirm before its expiry, or it confirmed too late for us to reveal + our preimage and claim. + */ + FAILURE_REASON_TIMEOUT = 2; + + /* + FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed + because the on chain htlc wasn't swept before the server revoked the + htlc. + */ + FAILURE_REASON_SWEEP_TIMEOUT = 3; + + /* + FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed + because the on chain htlc had a lower value than requested. + */ + FAILURE_REASON_INSUFFICIENT_VALUE = 4; + + /* + FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an + internal error. Manual intervention such as a restart is required. + */ + FAILURE_REASON_TEMPORARY = 5; + + /* + FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed + because the amount extended by an external loop in htlc is insufficient. + */ + FAILURE_REASON_INCORRECT_AMOUNT = 6; +} + message ListSwapsRequest { } diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index e6fd84e..8c01bc1 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -318,6 +318,20 @@ } }, "definitions": { + "looprpcFailureReason": { + "type": "string", + "enum": [ + "FAILURE_REASON_NONE", + "FAILURE_REASON_OFFCHAIN", + "FAILURE_REASON_TIMEOUT", + "FAILURE_REASON_SWEEP_TIMEOUT", + "FAILURE_REASON_INSUFFICIENT_VALUE", + "FAILURE_REASON_TEMPORARY", + "FAILURE_REASON_INCORRECT_AMOUNT" + ], + "default": "FAILURE_REASON_NONE", + "description": " - FAILURE_REASON_NONE: FAILURE_REASON_NONE is set when the swap did not fail, it is either in\nprogress or succeeded.\n - FAILURE_REASON_OFFCHAIN: FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't\npossible to find a route for one or both off chain payments that met the fee\nand timelock limits required.\n - FAILURE_REASON_TIMEOUT: FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc\ndid not confirm before its expiry, or it confirmed too late for us to reveal\nour preimage and claim.\n - FAILURE_REASON_SWEEP_TIMEOUT: FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed\nbecause the on chain htlc wasn't swept before the server revoked the\nhtlc.\n - FAILURE_REASON_INSUFFICIENT_VALUE: FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed\nbecause the on chain htlc had a lower value than requested.\n - FAILURE_REASON_TEMPORARY: FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an\ninternal error. Manual intervention such as a restart is required.\n - FAILURE_REASON_INCORRECT_AMOUNT: FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed\nbecause the amount extended by an external loop in htlc is insufficient." + }, "looprpcInQuoteResponse": { "type": "object", "properties": { @@ -629,6 +643,10 @@ "$ref": "#/definitions/looprpcSwapState", "description": "*\nState the swap is currently in, see State enum." }, + "failure_reason": { + "$ref": "#/definitions/looprpcFailureReason", + "description": "A failure reason for the swap, only set if the swap has failed." + }, "initiation_time": { "type": "string", "format": "int64",