Skip to content

Commit 4cc7493

Browse files
committed
0.20.1 lnd, loop 0.32 grpc updates, library version bumps
1 parent 3efe9fe commit 4cc7493

File tree

10 files changed

+179
-64
lines changed

10 files changed

+179
-64
lines changed

LNBolt.Tests/LNBolt.Tests.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="EndianBinaryIO" Version="1.1.2"/>
12-
<PackageReference Include="Google.Protobuf" Version="3.33.1"/>
13-
<PackageReference Include="Grpc.Net.Client" Version="2.71.0"/>
12+
<PackageReference Include="Google.Protobuf" Version="3.34.0"/>
13+
<PackageReference Include="Grpc.Net.Client" Version="2.76.0"/>
1414
<PackageReference Include="Microsoft.ClearScript.V8.Native.osx-arm64" Version="7.5.0"/>
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
16-
<PackageReference Include="NLightning.Bolt11" Version="4.0.0"/>
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0"/>
16+
<PackageReference Include="NLightning.Bolt11" Version="4.0.5"/>
1717
<PackageReference Include="NUnit" Version="3.14.0"/>
18-
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0"/>
19-
<PackageReference Include="org.ldk" Version="0.1.5"/>
20-
<PackageReference Include="coverlet.collector" Version="6.0.4">
18+
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0"/>
19+
<PackageReference Include="org.ldk" Version="0.2.0"/>
20+
<PackageReference Include="coverlet.collector" Version="8.0.0">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>

LNBolt/LNBolt.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
</PropertyGroup>
1616
<ItemGroup>
1717
<PackageReference Include="EndianBinaryIO" Version="1.1.2"/>
18-
<PackageReference Include="Google.Protobuf" Version="3.33.1"/>
19-
<PackageReference Include="Grpc.Net.Client" Version="2.71.0"/>
20-
<PackageReference Include="NBitcoin" Version="9.0.3"/>
18+
<PackageReference Include="Google.Protobuf" Version="3.34.0"/>
19+
<PackageReference Include="Grpc.Net.Client" Version="2.76.0"/>
20+
<PackageReference Include="NBitcoin" Version="9.0.5"/>
2121
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0"/>
22-
<PackageReference Include="ServiceStack.Text" Version="8.10.0"/>
22+
<PackageReference Include="ServiceStack.Text" Version="10.0.6"/>
2323
<None Include="README.md" Pack="true" PackagePath="\"/>
2424
</ItemGroup>
2525
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../lightning.proto

LNUnit.LND/Grpc/looprpc/client.proto

Lines changed: 102 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
syntax = "proto3";
22

33
import "swapserverrpc/common.proto";
4+
import "lnrpc/lightning.proto";
45

56
package looprpc;
67

@@ -38,6 +39,12 @@ service SwapClient {
3839
*/
3940
rpc ListSwaps (ListSwapsRequest) returns (ListSwapsResponse);
4041

42+
/* loop: `sweephtlc`
43+
SweepHtlc spends a swap HTLC output via the preimage (success) path using
44+
the swap's known preimage or an optionally supplied one.
45+
*/
46+
rpc SweepHtlc (SweepHtlcRequest) returns (SweepHtlcResponse);
47+
4148
/* loop: `swapinfo`
4249
SwapInfo returns all known details about a single swap.
4350
*/
@@ -200,13 +207,34 @@ service SwapClient {
200207
rpc GetStaticAddressSummary (StaticAddressSummaryRequest)
201208
returns (StaticAddressSummaryResponse);
202209

203-
/* loop:`static`
210+
/* loop:`static in`
204211
StaticAddressLoopIn initiates a static address loop-in swap.
205212
*/
206213
rpc StaticAddressLoopIn (StaticAddressLoopInRequest)
207214
returns (StaticAddressLoopInResponse);
215+
216+
/* loop:`static openchannel`
217+
StaticOpenChannel opens a channel funded by selected static address
218+
deposits.
219+
*/
220+
rpc StaticOpenChannel (StaticOpenChannelRequest)
221+
returns (StaticOpenChannelResponse);
222+
}
223+
224+
message StaticOpenChannelRequest {
225+
// Wrap lnd's request so Loop can extend this RPC with Loop-specific fields
226+
// without diverging from the upstream API surface.
227+
lnrpc.OpenChannelRequest open_channel_request = 1;
208228
}
209229

230+
message StaticOpenChannelResponse {
231+
/*
232+
The outpoint of the channel opening transaction in the format
233+
"txid:output_index".
234+
*/
235+
string channel_open_outpoint = 1;
236+
};
237+
210238
message StopDaemonRequest {
211239
}
212240

@@ -739,6 +767,61 @@ message ListSwapsResponse {
739767
int64 next_start_time = 2;
740768
}
741769

770+
// SweepHtlcRequest instructs loopd to sweep a swap HTLC via its success path.
771+
message SweepHtlcRequest {
772+
// Optional override for the sweep destination; defaults to a new address
773+
// derived from the connected lnd wallet.
774+
string dest_address = 1;
775+
776+
// Fee rate used for the sweep transaction in sat/vByte.
777+
uint32 sat_per_vbyte = 2;
778+
779+
// HTLC outpoint to sweep, formatted as "txid:vout".
780+
string outpoint = 3;
781+
782+
// Optional override for the stored swap preimage.
783+
bytes preimage = 4;
784+
785+
// If true, publish the sweep transaction immediately.
786+
bool publish = 5;
787+
788+
// The HTLC address whose output is being swept; used to derive the
789+
// expected pkScript.
790+
string htlc_address = 6;
791+
}
792+
793+
// SweepHtlcResponse returns the broadcast sweep transaction.
794+
message SweepHtlcResponse {
795+
// Raw sweep transaction bytes.
796+
bytes sweep_tx = 1;
797+
798+
// Miner fee paid by the sweep transaction.
799+
uint64 fee_sats = 2;
800+
801+
// Publish outcome.
802+
oneof publish {
803+
PublishNotRequested not_requested = 3;
804+
PublishSucceeded published = 4;
805+
PublishFailed failed = 5;
806+
}
807+
}
808+
809+
// PublishNotRequested is returned by SweepHtlc if publishing was not requested
810+
// in SweepHtlcRequest.
811+
message PublishNotRequested {
812+
}
813+
814+
// PublishSucceeded is returned by SweepHtlc if publishing was requested in
815+
// SweepHtlcRequest and it succeeded.
816+
message PublishSucceeded {
817+
}
818+
819+
// PublishFailed is returned by SweepHtlc if publishing was requested in
820+
// SweepHtlcRequest, but failed. It includes the error message.
821+
message PublishFailed {
822+
string error = 1;
823+
}
824+
742825
message SwapInfoRequest {
743826
/*
744827
The swap identifier which currently is the hash that locks the HTLCs. When
@@ -1710,7 +1793,7 @@ message WithdrawDepositsRequest {
17101793
/*
17111794
The outpoints of the deposits to withdraw.
17121795
*/
1713-
repeated OutPoint outpoints = 1;
1796+
repeated lnrpc.OutPoint outpoints = 1;
17141797

17151798
/*
17161799
If set to true, all deposits will be withdrawn.
@@ -1749,23 +1832,6 @@ message WithdrawDepositsResponse {
17491832
string address = 2;
17501833
}
17511834

1752-
message OutPoint {
1753-
/*
1754-
Raw bytes representing the transaction id.
1755-
*/
1756-
bytes txid_bytes = 1;
1757-
1758-
/*
1759-
Reversed, hex-encoded string representing the transaction id.
1760-
*/
1761-
string txid_str = 2;
1762-
1763-
/*
1764-
The index of the output on the transaction.
1765-
*/
1766-
uint32 output_index = 3;
1767-
}
1768-
17691835
message ListStaticAddressDepositsRequest {
17701836
/*
17711837
Filters the list of all stored deposits by deposit state.
@@ -1853,6 +1919,11 @@ message StaticAddressSummaryResponse {
18531919
The total value of all htlc timeout sweeps that the client swept.
18541920
*/
18551921
int64 value_htlc_timeout_sweeps_satoshis = 9;
1922+
1923+
/*
1924+
The total value of all deposits that have been used for channel openings.
1925+
*/
1926+
int64 value_channels_opened = 10;
18561927
}
18571928

18581929
enum DepositState {
@@ -1921,6 +1992,18 @@ enum DepositState {
19211992
has been sufficiently confirmed.
19221993
*/
19231994
EXPIRED = 10;
1995+
1996+
/*
1997+
OPENING_CHANNEL indicates that the channel open in which the deposit was
1998+
used is in progress.
1999+
*/
2000+
OPENING_CHANNEL = 11;
2001+
2002+
/*
2003+
CHANNEL_PUBLISHED indicates that the channel open was finalized and
2004+
published and that it should be managed from lnd from now on.
2005+
*/
2006+
CHANNEL_PUBLISHED = 12;
19242007
}
19252008

19262009
message Deposit {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
syntax = "proto3";
2+
3+
package looprpc;
4+
5+
option go_package = "github.com/lightninglabs/loop/looprpc";
6+
7+
/*
8+
Debug is a service that exposes endpoints intended for testing purposes. These
9+
endpoints should not operate on mainnet, and should only be included if loop is
10+
built with the dev build tag.
11+
*/
12+
service Debug {
13+
/*
14+
ForceAutoLoop is intended for *testing purposes only* and will not work on
15+
mainnet. This endpoint ticks our autoloop timer, triggering automated
16+
dispatch of a swap if one is suggested.
17+
*/
18+
rpc ForceAutoLoop (ForceAutoLoopRequest) returns (ForceAutoLoopResponse);
19+
}
20+
21+
message ForceAutoLoopRequest {
22+
}
23+
24+
message ForceAutoLoopResponse {
25+
}

LNUnit.LND/LNUnit.LND.csproj

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,32 @@
55
<Nullable>enable</Nullable>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<PackageId>LNUnit.LND</PackageId>
8-
<Version>3.0.3</Version>
8+
<Version>3.0.4</Version>
99
<PackageDescription>LNUnit LND Typed Clients</PackageDescription>
1010
<TargetFramework>net10.0</TargetFramework>
1111
<LangVersion>14.0</LangVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Google.Protobuf" Version="3.33.1"/>
16-
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.71.0"/>
17-
<PackageReference Include="Grpc.Tools" Version="2.76.0">
15+
<PackageReference Include="Google.Protobuf" Version="3.34.0"/>
16+
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.76.0"/>
17+
<PackageReference Include="Grpc.Tools" Version="2.78.0">
1818
<PrivateAssets>all</PrivateAssets>
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2020
</PackageReference>
21-
<PackageReference Include="NBitcoin" Version="9.0.3"/>
22-
<PackageReference Include="ServiceStack.Text" Version="8.10.0"/>
23-
</ItemGroup>
24-
<ItemGroup>
25-
<Folder Include="Grpc\"/>
21+
<PackageReference Include="NBitcoin" Version="9.0.5"/>
22+
<PackageReference Include="ServiceStack.Text" Version="10.0.6"/>
2623
</ItemGroup>
2724
<ItemGroup>
25+
<Protobuf Include="Grpc\lightning.proto">
26+
<GrpcServices>Client</GrpcServices>
27+
<Access>Public</Access>
28+
<ProtoCompile>True</ProtoCompile>
29+
<ProtoRoot>Grpc</ProtoRoot>
30+
<CompileOutputs>True</CompileOutputs>
31+
<OutputDir>obj/Debug/net10.0/Grpc/</OutputDir>
32+
<Generator>MSBuild:Compile</Generator>
33+
</Protobuf>
2834
<Protobuf Include="Grpc\verrpc\verrpc.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
2935
<Protobuf Include="Grpc\autopilotrpc\autopilot.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
3036
<Protobuf Include="Grpc\chainrpc\chainnotifier.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
@@ -34,7 +40,6 @@
3440
<Protobuf Include="Grpc\wtclientrpc\wtclient.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
3541
<Protobuf Include="Grpc\watchtowerrpc\watchtower.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
3642
<Protobuf Include="Grpc\routerrpc\router.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
37-
<Protobuf Include="Grpc\lightning.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
3843
<Protobuf Include="Grpc\stateservice.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
3944
<Protobuf Include="Grpc\peersrpc\peers.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>
4045
<Protobuf Include="Grpc\devrpc\dev.proto" GrpcServices="Client" ProtoRoot="Grpc" OutputDir="$(Protobuf_OutputPath)%(RelativeDir)"/>

LNUnit.LND/update-protofiles.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ mkdir -p ./Grpc/peersrpc
1515
mkdir -p ./Grpc/looprpc
1616
mkdir -p ./Grpc/swapserverrpc
1717

18-
LND_TAG=${1:-v0.20.0-beta}
19-
LOOP_TAG=${2:-v0.31.7-beta}
18+
LND_TAG=${1:-v0.20.1-beta}
19+
LOOP_TAG=${2:-v0.32.1-beta}
2020

2121

2222
wget -O ./Grpc/lightning.proto https://raw.githubusercontent.com/lightningnetwork/lnd/$LND_TAG/lnrpc/lightning.proto
@@ -36,4 +36,5 @@ wget -O ./Grpc/peersrpc/peers.proto https://raw.githubusercontent.com/lightningn
3636
wget -O ./Grpc/devrpc/dev.proto https://raw.githubusercontent.com/lightningnetwork/lnd/$LND_TAG/lnrpc/devrpc/dev.proto
3737
# loopd
3838
wget -O ./Grpc/looprpc/client.proto https://raw.githubusercontent.com/lightninglabs/loop/$LOOP_TAG/looprpc/client.proto
39+
wget -O ./Grpc/looprpc/debug.proto https://raw.githubusercontent.com/lightninglabs/loop/$LOOP_TAG/looprpc/debug.proto
3940
wget -O ./Grpc/swapserverrpc/common.proto https://raw.githubusercontent.com/lightninglabs/loop/$LOOP_TAG/swapserverrpc/common.proto

LNUnit.Tests/AbcLightningFixtureSqlite.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace LNUnit.Tests;
66

77
//[Ignore("only local")]
88
//[TestFixture("sqlite", "custom_lnd", "latest", "/home/lnd/.lnd", false)]
9-
[TestFixture("sqlite", "lightninglabs/lnd", "v0.20.0-beta", "/root/.lnd", true)]
9+
[TestFixture("sqlite", "lightninglabs/lnd", "v0.20.1-beta", "/root/.lnd", true)]
1010
public class AbcLightningAbstractTestsSqlite : AbcLightningAbstractTests
1111
{
1212
public AbcLightningAbstractTestsSqlite(string dbType = "sqlite",

LNUnit.Tests/LNUnit.Tests.csproj

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,36 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Docker.DotNet" Version="3.125.15"/>
15-
<PackageReference Include="Google.Protobuf" Version="3.33.1"/>
16-
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.71.0"/>
17-
<PackageReference Include="Grpc.Net.Client" Version="2.71.0"/>
18-
<PackageReference Include="Grpc.Net.Common" Version="2.71.0"/>
15+
<PackageReference Include="Google.Protobuf" Version="3.34.0"/>
16+
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.76.0"/>
17+
<PackageReference Include="Grpc.Net.Client" Version="2.76.0"/>
18+
<PackageReference Include="Grpc.Net.Common" Version="2.76.0"/>
1919

20-
<PackageReference Include="JunitXml.TestLogger" Version="7.0.2"/>
21-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0"/>
22-
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.0"/>
23-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite" Version="10.0.0"/>
24-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
20+
<PackageReference Include="JunitXml.TestLogger" Version="8.0.0"/>
21+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3"/>
22+
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3"/>
23+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite" Version="10.0.3"/>
24+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0"/>
2525
<!-- <PackageReference Include="NLightning.Bolt11" Version="4.0.0" />-->
26-
<PackageReference Include="Npgsql" Version="9.0.4"/>
26+
<PackageReference Include="Npgsql" Version="10.0.1"/>
2727
<PackageReference Include="NUnit" Version="3.14.0"/>
28-
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0"/>
28+
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0"/>
2929
<PackageReference Include="NUnit.Analyzers" Version="4.11.2">
3030
<PrivateAssets>all</PrivateAssets>
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3232
</PackageReference>
33-
<PackageReference Include="coverlet.collector" Version="6.0.4">
33+
<PackageReference Include="coverlet.collector" Version="8.0.0">
3434
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3535
<PrivateAssets>all</PrivateAssets>
3636
</PackageReference>
37-
<PackageReference Include="ServiceStack" Version="8.10.0"/>
37+
<PackageReference Include="ServiceStack" Version="10.0.6"/>
3838
<PackageReference Include="SharpCompress" Version="0.41.0"/>
3939

4040
<PackageReference Include="Serilog.Sinks.Seq" Version="9.0.0"/>
4141
<!-- <PackageReference Include="Serilog.Sinks.AwsCloudWatch" Version="4.0.182"/>-->
42-
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0"/>
42+
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0"/>
4343
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1"/>
44-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0"/>
44+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.3"/>
4545
</ItemGroup>
4646

4747
<ItemGroup>

0 commit comments

Comments
 (0)