From 8cedcc981fdf6f218c814ef6330663b731ca1621 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 15 Feb 2023 13:06:01 +0200 Subject: [PATCH 1/4] go.mod+g.sum: bump loop version to v0.21.0-beta --- go.mod | 2 +- go.sum | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 72ccdb733..659149c71 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/lightninglabs/lightning-node-connect v0.1.12-alpha github.com/lightninglabs/lightning-terminal/autopilotserverrpc v0.0.1 github.com/lightninglabs/lndclient v0.15.4-0 - github.com/lightninglabs/loop v0.20.2-beta + github.com/lightninglabs/loop v0.21.0-beta github.com/lightninglabs/loop/swapserverrpc v1.0.3 github.com/lightninglabs/pool v0.6.1-beta.0.20221202155747-aec0aee8d9a1 github.com/lightninglabs/pool/auctioneerrpc v1.1.0 diff --git a/go.sum b/go.sum index f7e75cc85..f12975165 100644 --- a/go.sum +++ b/go.sum @@ -80,7 +80,6 @@ github.com/btcsuite/btcd v0.22.0-beta.0.20220316175102-8d5c75c28923/go.mod h1:ta github.com/btcsuite/btcd v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= -github.com/btcsuite/btcd v0.23.2/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.4 h1:IzV6qqkfwbItOS/sg/aDfPDsjPP8twrCOE2R93hxMlQ= github.com/btcsuite/btcd v0.23.4/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= @@ -562,8 +561,8 @@ github.com/lightninglabs/lndclient v0.15.0-0/go.mod h1:ORS/YFe9hAXlzN/Uj+gvTmrnX github.com/lightninglabs/lndclient v0.15.1-5/go.mod h1:6pymu+B4mYQDWQH1Beu51Pnrj556xNlqOe5j1ITsADE= github.com/lightninglabs/lndclient v0.15.4-0 h1:K+Biu0V94VRLBmc+DQJcU0KrRQI7wOndIAFpV7qIGiQ= github.com/lightninglabs/lndclient v0.15.4-0/go.mod h1:bCUgwozVk/5O99DajpJxUfaCbjSXgHuis5WT2iC7B5c= -github.com/lightninglabs/loop v0.20.2-beta h1:cqWUL0MvWqwF8o8Ba/Ya7KAGhRwKgcE1svG0WireASU= -github.com/lightninglabs/loop v0.20.2-beta/go.mod h1:2ZC0KRnPSp4QhQh5hMn63l50l9n3PxPh5TonYJX0wNo= +github.com/lightninglabs/loop v0.21.0-beta h1:owJ+xPl3roSmcc51ofGBSzHgBVtj/6KmU5gWc0xfNRM= +github.com/lightninglabs/loop v0.21.0-beta/go.mod h1:mVxxiGCyE1VpVREQBM29qg2D6ZZ6m/qpLZBeeNNN7JI= github.com/lightninglabs/loop/swapserverrpc v1.0.1/go.mod h1:imy1/sqnb70EEyBKMo4pHwwLBPW8uYahWZ8s+1Xcq1o= github.com/lightninglabs/loop/swapserverrpc v1.0.3 h1:Uslz7QZ2MWKo00JrEumCqDs9S4hR6Is4cA2GsoTbLd8= github.com/lightninglabs/loop/swapserverrpc v1.0.3/go.mod h1:imy1/sqnb70EEyBKMo4pHwwLBPW8uYahWZ8s+1Xcq1o= @@ -582,7 +581,7 @@ github.com/lightningnetwork/lightning-onion v1.0.2-0.20220211021909-bb84a1ccb0c5 github.com/lightningnetwork/lnd v0.14.1-beta.0.20220324135938-0dcaa511a249/go.mod h1:Tp3ZxsfioUl6kQ30RrbMqWoZyZ4K+fv/o1lMEU8U7rA= github.com/lightningnetwork/lnd v0.15.0-beta.rc3/go.mod h1:NzCE1ZGct0YEW9u74TXUpXp5AoUXzpkI5lgrO7x0ugM= github.com/lightningnetwork/lnd v0.15.1-beta/go.mod h1:21UpSyTj8n94nsaJ0OFRXk4yOEkE7xA9JEX5QS4oMy4= -github.com/lightningnetwork/lnd v0.15.3-beta/go.mod h1:UaCwJBMCJbwPMsUjfTIaKPKF8K79btRPnhqfiNPyKtA= +github.com/lightningnetwork/lnd v0.15.4-beta/go.mod h1:6aoOkifcI9tuk8UV5l2rVZSq0681obuP4zvfK+2ZrT0= github.com/lightningnetwork/lnd v0.15.5-beta h1:jdGVLJIYSe60NAn7qzBY3gET2I/FmLW4TTGvrECmgOE= github.com/lightningnetwork/lnd v0.15.5-beta/go.mod h1:/UKsaOll/pYJltXIC0VKRGHR0Jqhl9bBX/fUiINSwF4= github.com/lightningnetwork/lnd/cert v1.1.1 h1:Nsav0RlIDRbOnzz2Yu69SQlK939IKya3Q2S0mDviIN8= From b8aaa8e98ff4888e41ff5015a3d7578fd77acee4 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 15 Feb 2023 13:06:45 +0200 Subject: [PATCH 2/4] app+proto: run make protos and make Update the generated app and proto files. --- app/src/types/generated/loop_pb.d.ts | 12 ++-- app/src/types/generated/loop_pb.js | 83 ++++++++++------------------ app/src/util/tests/sampleData.ts | 1 - proto/loop.proto | 21 +++---- 4 files changed, 40 insertions(+), 77 deletions(-) diff --git a/app/src/types/generated/loop_pb.d.ts b/app/src/types/generated/loop_pb.d.ts index b53a1ec19..93d9189e1 100644 --- a/app/src/types/generated/loop_pb.d.ts +++ b/app/src/types/generated/loop_pb.d.ts @@ -150,9 +150,6 @@ export class SwapResponse extends jspb.Message { getHtlcAddress(): string; setHtlcAddress(value: string): void; - getHtlcAddressNp2wsh(): string; - setHtlcAddressNp2wsh(value: string): void; - getHtlcAddressP2wsh(): string; setHtlcAddressP2wsh(value: string): void; @@ -177,7 +174,6 @@ export namespace SwapResponse { id: string, idBytes: Uint8Array | string, htlcAddress: string, - htlcAddressNp2wsh: string, htlcAddressP2wsh: string, htlcAddressP2tr: string, serverMessage: string, @@ -233,9 +229,6 @@ export class SwapStatus extends jspb.Message { getHtlcAddressP2wsh(): string; setHtlcAddressP2wsh(value: string): void; - getHtlcAddressNp2wsh(): string; - setHtlcAddressNp2wsh(value: string): void; - getHtlcAddressP2tr(): string; setHtlcAddressP2tr(value: string): void; @@ -283,7 +276,6 @@ export namespace SwapStatus { lastUpdateTime: string, htlcAddress: string, htlcAddressP2wsh: string, - htlcAddressNp2wsh: string, htlcAddressP2tr: string, costServer: string, costOnchain: string, @@ -758,6 +750,9 @@ export class LiquidityParameters extends jspb.Message { getHtlcConfTarget(): number; setHtlcConfTarget(value: number): void; + getAutoloopDestAddress(): string; + setAutoloopDestAddress(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LiquidityParameters.AsObject; static toObject(includeInstance: boolean, msg: LiquidityParameters): LiquidityParameters.AsObject; @@ -787,6 +782,7 @@ export namespace LiquidityParameters { minSwapAmount: string, maxSwapAmount: string, htlcConfTarget: number, + autoloopDestAddress: string, } } diff --git a/app/src/types/generated/loop_pb.js b/app/src/types/generated/loop_pb.js index a585bfe48..17c3c22e7 100644 --- a/app/src/types/generated/loop_pb.js +++ b/app/src/types/generated/loop_pb.js @@ -1050,7 +1050,6 @@ proto.looprpc.SwapResponse.toObject = function(includeInstance, msg) { id: jspb.Message.getFieldWithDefault(msg, 1, ""), idBytes: msg.getIdBytes_asB64(), htlcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), - htlcAddressNp2wsh: jspb.Message.getFieldWithDefault(msg, 4, ""), htlcAddressP2wsh: jspb.Message.getFieldWithDefault(msg, 5, ""), htlcAddressP2tr: jspb.Message.getFieldWithDefault(msg, 7, ""), serverMessage: jspb.Message.getFieldWithDefault(msg, 6, "") @@ -1102,10 +1101,6 @@ proto.looprpc.SwapResponse.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setHtlcAddress(value); break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddressNp2wsh(value); - break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setHtlcAddressP2wsh(value); @@ -1168,13 +1163,6 @@ proto.looprpc.SwapResponse.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getHtlcAddressNp2wsh(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } f = message.getHtlcAddressP2wsh(); if (f.length > 0) { writer.writeString( @@ -1268,21 +1256,6 @@ proto.looprpc.SwapResponse.prototype.setHtlcAddress = function(value) { }; -/** - * optional string htlc_address_np2wsh = 4; - * @return {string} - */ -proto.looprpc.SwapResponse.prototype.getHtlcAddressNp2wsh = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.looprpc.SwapResponse.prototype.setHtlcAddressNp2wsh = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - /** * optional string htlc_address_p2wsh = 5; * @return {string} @@ -1508,7 +1481,6 @@ proto.looprpc.SwapStatus.toObject = function(includeInstance, msg) { lastUpdateTime: jspb.Message.getFieldWithDefault(msg, 6, "0"), htlcAddress: jspb.Message.getFieldWithDefault(msg, 7, ""), htlcAddressP2wsh: jspb.Message.getFieldWithDefault(msg, 12, ""), - htlcAddressNp2wsh: jspb.Message.getFieldWithDefault(msg, 13, ""), htlcAddressP2tr: jspb.Message.getFieldWithDefault(msg, 18, ""), costServer: jspb.Message.getFieldWithDefault(msg, 8, "0"), costOnchain: jspb.Message.getFieldWithDefault(msg, 9, "0"), @@ -1592,10 +1564,6 @@ proto.looprpc.SwapStatus.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setHtlcAddressP2wsh(value); break; - case 13: - var value = /** @type {string} */ (reader.readString()); - msg.setHtlcAddressNp2wsh(value); - break; case 18: var value = /** @type {string} */ (reader.readString()); msg.setHtlcAddressP2tr(value); @@ -1723,13 +1691,6 @@ proto.looprpc.SwapStatus.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getHtlcAddressNp2wsh(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } f = message.getHtlcAddressP2tr(); if (f.length > 0) { writer.writeString( @@ -1956,21 +1917,6 @@ proto.looprpc.SwapStatus.prototype.setHtlcAddressP2wsh = function(value) { }; -/** - * optional string htlc_address_np2wsh = 13; - * @return {string} - */ -proto.looprpc.SwapStatus.prototype.getHtlcAddressNp2wsh = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** @param {string} value */ -proto.looprpc.SwapStatus.prototype.setHtlcAddressNp2wsh = function(value) { - jspb.Message.setProto3StringField(this, 13, value); -}; - - /** * optional string htlc_address_p2tr = 18; * @return {string} @@ -5192,7 +5138,8 @@ proto.looprpc.LiquidityParameters.toObject = function(includeInstance, msg) { autoMaxInFlight: jspb.Message.getFieldWithDefault(msg, 13, "0"), minSwapAmount: jspb.Message.getFieldWithDefault(msg, 14, "0"), maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 15, "0"), - htlcConfTarget: jspb.Message.getFieldWithDefault(msg, 17, 0) + htlcConfTarget: jspb.Message.getFieldWithDefault(msg, 17, 0), + autoloopDestAddress: jspb.Message.getFieldWithDefault(msg, 18, "") }; if (includeInstance) { @@ -5298,6 +5245,10 @@ proto.looprpc.LiquidityParameters.deserializeBinaryFromReader = function(msg, re var value = /** @type {number} */ (reader.readInt32()); msg.setHtlcConfTarget(value); break; + case 18: + var value = /** @type {string} */ (reader.readString()); + msg.setAutoloopDestAddress(value); + break; default: reader.skipField(); break; @@ -5447,6 +5398,13 @@ proto.looprpc.LiquidityParameters.serializeBinaryToWriter = function(message, wr f ); } + f = message.getAutoloopDestAddress(); + if (f.length > 0) { + writer.writeString( + 18, + f + ); + } }; @@ -5723,6 +5681,21 @@ proto.looprpc.LiquidityParameters.prototype.setHtlcConfTarget = function(value) }; +/** + * optional string autoloop_dest_address = 18; + * @return {string} + */ +proto.looprpc.LiquidityParameters.prototype.getAutoloopDestAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, "")); +}; + + +/** @param {string} value */ +proto.looprpc.LiquidityParameters.prototype.setAutoloopDestAddress = function(value) { + jspb.Message.setProto3StringField(this, 18, value); +}; + + /** * Generated by JsPbCodeGenerator. diff --git a/app/src/util/tests/sampleData.ts b/app/src/util/tests/sampleData.ts index 8a352d712..01c923102 100644 --- a/app/src/util/tests/sampleData.ts +++ b/app/src/util/tests/sampleData.ts @@ -369,7 +369,6 @@ export const loopInQuote: LOOP.InQuoteResponse.AsObject = { export const loopSwapResponse: LOOP.SwapResponse.AsObject = { htlcAddress: 'bcrt1qkjct8aqxfwyla50mfxdnzlmuphg3zwuz2zmuy99c9sw67xj7tn2sfkflhw', - htlcAddressNp2wsh: '', htlcAddressP2wsh: 'bcrt1qkjct8aqxfwyla50mfxdnzlmuphg3zwuz2zmuy99c9sw67xj7tn2sfkflhw', id: '18e17a2f44efc7f344ef6330281765e569315f93d3eaf9b0f959b404836e3480', idBytes: 'GOF6L0Tvx/NE72MwKBdl5WkxX5PT6vmw+Vm0BINuNIA=', diff --git a/proto/loop.proto b/proto/loop.proto index 2538de939..600ccc272 100644 --- a/proto/loop.proto +++ b/proto/loop.proto @@ -298,18 +298,12 @@ message SwapResponse { depending on the request, the semantics are different. - For internal loop-in htlc_address contains the address of the native segwit (P2WSH) htlc. - - For external loop-in htlc_address contains the address of the - nested segwit (NP2WSH) htlc. - - For loop-out htlc_address always contains the native segwit (P2WSH) +/ - For loop-out htlc_address always contains the native segwit (P2WSH) htlc address. */ string htlc_address = 2 [deprecated = true]; - /* - The nested segwit address of the on-chain htlc. - This field remains empty for loop-out. - */ - string htlc_address_np2wsh = 4; + reserved 4; /* The native segwit address of the on-chain htlc. @@ -377,8 +371,6 @@ message SwapStatus { DEPRECATED: This field stores the address of the onchain htlc. - For internal loop-in htlc_address contains the address of the native segwit (P2WSH) htlc. - - For external loop-in htlc_address contains the nested segwit (NP2WSH) - address. - For loop-out htlc_address always contains the native segwit (P2WSH) htlc address. */ @@ -387,9 +379,6 @@ message SwapStatus { // HTLC address (native segwit), used in loop-in and loop-out swaps. string htlc_address_p2wsh = 12; - // HTLC address (nested segwit), used in loop-in swaps only. - string htlc_address_np2wsh = 13; - // The address of the v3 (taproot) htlc. Used for both loop-in and loop-out. string htlc_address_p2tr = 18; @@ -865,6 +854,12 @@ message LiquidityParameters { The confirmation target for loop in on-chain htlcs. */ int32 htlc_conf_target = 17; + + /* + The destination address to use for autoloop loop outs. Set to "default" in + order to revert to default behavior. + */ + string autoloop_dest_address = 18; } enum LiquidityRuleType { From 09394c2df49d16c3209caef885ffd9e7738234da Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 15 Feb 2023 13:08:59 +0200 Subject: [PATCH 3/4] README+version: prep Litd for v0.8.6-beta release --- README.md | 2 ++ version.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 456702026..47a318aee 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ versioning](#daemon-versions-packaged-with-lit). | LiT | LND | |------------------|--------------| +| **v0.8.6-alpha** | v0.15.4-beta | | **v0.8.5-alpha** | v0.15.4-beta | | **v0.8.4-alpha** | v0.15.1-beta | | **v0.8.3-alpha** | v0.15.1-beta | @@ -131,6 +132,7 @@ The following table shows the supported combinations: | LiT | LND | Loop | Faraday | Pool | |------------------|--------------|--------------|--------------|--------------| +| **v0.8.6-alpha** | v0.15.5-beta | v0.21.0-beta | v0.2.9-alpha | v0.6.1-beta | | **v0.8.5-alpha** | v0.15.5-beta | v0.20.2-beta | v0.2.9-alpha | v0.6.1-beta | | **v0.8.4-alpha** | v0.15.5-beta | v0.20.1-beta | v0.2.9-alpha | v0.5.8-alpha | | **v0.8.3-alpha** | v0.15.4-beta | v0.20.1-beta | v0.2.8-alpha | v0.5.8-alpha | diff --git a/version.go b/version.go index 9a072bb38..66da21cf0 100644 --- a/version.go +++ b/version.go @@ -23,7 +23,7 @@ const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr const ( appMajor uint = 0 appMinor uint = 8 - appPatch uint = 5 + appPatch uint = 6 // appPreRelease MUST only contain characters from semanticAlphabet per // the semantic versioning spec. From 8b75c2e92ac2db5b0297b39544101ac6f20e3a32 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 15 Feb 2023 13:55:22 +0200 Subject: [PATCH 4/4] go.mod+go.sum: update faraday commit --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 659149c71..7a0cdb502 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/improbable-eng/grpc-web v0.12.0 github.com/jessevdk/go-flags v1.4.0 github.com/lightninglabs/aperture v0.1.18-beta - github.com/lightninglabs/faraday v0.2.9-alpha + github.com/lightninglabs/faraday v0.2.9-alpha.0.20230215114316-475a2fe8b5e1 github.com/lightninglabs/lightning-node-connect v0.1.12-alpha github.com/lightninglabs/lightning-terminal/autopilotserverrpc v0.0.1 github.com/lightninglabs/lndclient v0.15.4-0 diff --git a/go.sum b/go.sum index f12975165..de67cdc89 100644 --- a/go.sum +++ b/go.sum @@ -549,8 +549,8 @@ github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightninglabs/aperture v0.1.18-beta h1:LsrvNyCAeyD4v7xSQ3Lsu5AYX4CDx3ub0kuCv6/AMNQ= github.com/lightninglabs/aperture v0.1.18-beta/go.mod h1:lDjRKhndRH0CzZQ2m8dWODdqp/ejEW7esb2u2nlvrw4= -github.com/lightninglabs/faraday v0.2.9-alpha h1:P0fUJqIC8LPJ8LgUaXn9Ds/I8IxUqIxEoYfyuSQY1JE= -github.com/lightninglabs/faraday v0.2.9-alpha/go.mod h1:IeikNp9mmELLlGSmQg+Y9SwDndDXcKOxwAJMYd9ybvU= +github.com/lightninglabs/faraday v0.2.9-alpha.0.20230215114316-475a2fe8b5e1 h1:tMLNw1iuhunNIBo5AAItl3Zjqo8U4/sY+WrTtWweEVU= +github.com/lightninglabs/faraday v0.2.9-alpha.0.20230215114316-475a2fe8b5e1/go.mod h1:wiqeT43NmVv9HQlSzTVZmW6bRjoJDPNN1RpZr451aJE= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk= github.com/lightninglabs/lightning-node-connect v0.1.12-alpha h1:S/S2EmOoTsa6cCDcJjnHGvzkhf69XH7qJ4nMYBVpqwc=