From a168ba34000b7348be73e62358efbb894754286f Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 3 Feb 2021 08:54:47 +0200 Subject: [PATCH 1/6] liquidity: rename auto out boolean to autoloop --- liquidity/autoloop_test.go | 2 +- liquidity/liquidity.go | 16 ++++++++-------- loopd/swapclient_server.go | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/liquidity/autoloop_test.go b/liquidity/autoloop_test.go index 1b5424d..0cd3274 100644 --- a/liquidity/autoloop_test.go +++ b/liquidity/autoloop_test.go @@ -75,7 +75,7 @@ func TestAutoLoopEnabled(t *testing.T) { // is set to allow exactly 2 swaps at the prices that we set in our // test quotes. params := Parameters{ - AutoOut: true, + Autoloop: true, AutoFeeBudget: 40066, AutoFeeStartDate: testTime, MaxAutoInFlight: 2, diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 2ba3193..1891bea 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -220,8 +220,8 @@ type Config struct { // Parameters is a set of parameters provided by the user which guide // how we assess liquidity. type Parameters struct { - // AutoOut enables automatic dispatch of loop out swaps. - AutoOut bool + // Autoloop enables automatic dispatch of swaps. + Autoloop bool // AutoFeeBudget is the total amount we allow to be spent on // automatically dispatched swaps. Once this budget has been used, we @@ -538,11 +538,11 @@ func (m *Manager) ForceAutoLoop(ctx context.Context) error { // SuggestSwaps returns a set of swap suggestions based on our current liquidity // balance for the set of rules configured for the manager, failing if there are -// no rules set. It takes an autoOut boolean that indicates whether the +// no rules set. It takes an autoloop boolean that indicates whether the // suggestions are being used for our internal autolooper. This boolean is used // to determine the information we add to our swap suggestion and whether we // return any suggestions. -func (m *Manager) SuggestSwaps(ctx context.Context, autoOut bool) ( +func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) ( []loop.OutRequest, error) { m.paramsLock.Lock() @@ -681,7 +681,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoOut bool) ( } outRequest, err := m.makeLoopOutRequest( - ctx, suggestion, quote, autoOut, + ctx, suggestion, quote, autoloop, ) if err != nil { return nil, err @@ -731,7 +731,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoOut bool) ( // If we are getting suggestions for automatically dispatched swaps, // and they are not enabled in our parameters, we just log the swap // suggestions and return an empty set of suggestions. - if autoOut && !m.params.AutoOut { + if autoloop && !m.params.Autoloop { for _, swap := range inBudget { log.Debugf("recommended autoloop: %v sats over "+ "%v", swap.Amount, swap.OutgoingChanSet) @@ -791,7 +791,7 @@ func (m *Manager) getLoopOutRestrictions(ctx context.Context) (*Restrictions, // non-auto requests, because the client api will set it anyway). func (m *Manager) makeLoopOutRequest(ctx context.Context, suggestion *LoopOutRecommendation, quote *loop.LoopOutQuote, - autoOut bool) (loop.OutRequest, error) { + autoloop bool) (loop.OutRequest, error) { prepayMaxFee := ppmToSat( quote.PrepayAmount, m.params.MaximumPrepayRoutingFeePPM, @@ -815,7 +815,7 @@ func (m *Manager) makeLoopOutRequest(ctx context.Context, Initiator: autoloopSwapInitiator, } - if autoOut { + if autoloop { request.Label = labels.AutoOutLabel() addr, err := m.cfg.Lnd.WalletKit.NextAddr(ctx) diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 6d27a9e..d3f5ca4 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -581,7 +581,7 @@ func (s *swapClientServer) GetLiquidityParams(_ context.Context, SweepFeeRateSatPerVbyte: uint64(satPerByte), SweepConfTarget: cfg.SweepConfTarget, FailureBackoffSec: uint64(cfg.FailureBackOff.Seconds()), - AutoLoopOut: cfg.AutoOut, + AutoLoopOut: cfg.Autoloop, AutoOutBudgetSat: uint64(cfg.AutoFeeBudget), AutoMaxInFlight: uint64(cfg.MaxAutoInFlight), Rules: make( @@ -633,7 +633,7 @@ func (s *swapClientServer) SetLiquidityParams(ctx context.Context, SweepConfTarget: in.Parameters.SweepConfTarget, FailureBackOff: time.Duration(in.Parameters.FailureBackoffSec) * time.Second, - AutoOut: in.Parameters.AutoLoopOut, + Autoloop: in.Parameters.AutoLoopOut, AutoFeeBudget: btcutil.Amount(in.Parameters.AutoOutBudgetSat), MaxAutoInFlight: int(in.Parameters.AutoMaxInFlight), ChannelRules: make( From 71ace95ac8e84d4657a52b68ca0d09d2273610b4 Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 3 Feb 2021 08:54:48 +0200 Subject: [PATCH 2/6] loop: rename autoloop specific parameters --- cmd/loop/liquidity.go | 14 +- docs/autoloop.md | 2 +- loopd/swapclient_server.go | 14 +- looprpc/client.pb.go | 328 ++++++++++++++++++------------------ looprpc/client.proto | 14 +- looprpc/client.swagger.json | 10 +- release_notes.md | 5 + 7 files changed, 196 insertions(+), 191 deletions(-) diff --git a/cmd/loop/liquidity.go b/cmd/loop/liquidity.go index 1fff953..57b48ec 100644 --- a/cmd/loop/liquidity.go +++ b/cmd/loop/liquidity.go @@ -225,10 +225,10 @@ var setParamsCommand = cli.Command{ "included in suggestions.", }, cli.BoolFlag{ - Name: "autoout", + Name: "autoloop", Usage: "set to true to enable automated dispatch " + - "of loop out swaps, limited to the budget " + - "set by autobudget", + "of swaps, limited to the budget set by " + + "autobudget", }, cli.Uint64Flag{ Name: "autobudget", @@ -338,18 +338,18 @@ func setParams(ctx *cli.Context) error { flagSet = true } - if ctx.IsSet("autoout") { - params.AutoLoopOut = ctx.Bool("autoout") + if ctx.IsSet("autoloop") { + params.Autoloop = ctx.Bool("autoloop") flagSet = true } if ctx.IsSet("autobudget") { - params.AutoOutBudgetSat = ctx.Uint64("autobudget") + params.AutoloopBudgetSat = ctx.Uint64("autobudget") flagSet = true } if ctx.IsSet("budgetstart") { - params.AutoOutBudgetStartSec = ctx.Uint64("budgetstart") + params.AutoloopBudgetStartSec = ctx.Uint64("budgetstart") flagSet = true } diff --git a/docs/autoloop.md b/docs/autoloop.md index efc87b7..2a25232 100644 --- a/docs/autoloop.md +++ b/docs/autoloop.md @@ -6,7 +6,7 @@ budget of your choosing. The autoloop functionality is disabled by default, and can be enabled using the following command: ``` -loop setparams --autoout=true +loop setparams --autoloop=true ``` Swaps that are dispatched by the autolooper can be identified in the output of diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index d3f5ca4..abacd7a 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -581,8 +581,8 @@ func (s *swapClientServer) GetLiquidityParams(_ context.Context, SweepFeeRateSatPerVbyte: uint64(satPerByte), SweepConfTarget: cfg.SweepConfTarget, FailureBackoffSec: uint64(cfg.FailureBackOff.Seconds()), - AutoLoopOut: cfg.Autoloop, - AutoOutBudgetSat: uint64(cfg.AutoFeeBudget), + Autoloop: cfg.Autoloop, + AutoloopBudgetSat: uint64(cfg.AutoFeeBudget), AutoMaxInFlight: uint64(cfg.MaxAutoInFlight), Rules: make( []*looprpc.LiquidityRule, 0, len(cfg.ChannelRules), @@ -594,7 +594,7 @@ func (s *swapClientServer) GetLiquidityParams(_ context.Context, // Zero golang time is different to a zero unix time, so we only set // our start date if it is non-zero. if !cfg.AutoFeeStartDate.IsZero() { - rpcCfg.AutoOutBudgetStartSec = uint64( + rpcCfg.AutoloopBudgetStartSec = uint64( cfg.AutoFeeStartDate.Unix(), ) } @@ -633,8 +633,8 @@ func (s *swapClientServer) SetLiquidityParams(ctx context.Context, SweepConfTarget: in.Parameters.SweepConfTarget, FailureBackOff: time.Duration(in.Parameters.FailureBackoffSec) * time.Second, - Autoloop: in.Parameters.AutoLoopOut, - AutoFeeBudget: btcutil.Amount(in.Parameters.AutoOutBudgetSat), + Autoloop: in.Parameters.Autoloop, + AutoFeeBudget: btcutil.Amount(in.Parameters.AutoloopBudgetSat), MaxAutoInFlight: int(in.Parameters.AutoMaxInFlight), ChannelRules: make( map[lnwire.ShortChannelID]*liquidity.ThresholdRule, @@ -647,9 +647,9 @@ func (s *swapClientServer) SetLiquidityParams(ctx context.Context, } // Zero unix time is different to zero golang time. - if in.Parameters.AutoOutBudgetStartSec != 0 { + if in.Parameters.AutoloopBudgetStartSec != 0 { params.AutoFeeStartDate = time.Unix( - int64(in.Parameters.AutoOutBudgetStartSec), 0, + int64(in.Parameters.AutoloopBudgetStartSec), 0, ) } diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index e71060f..1a034d8 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -1609,20 +1609,20 @@ type LiquidityParameters struct { //suggestions again, expressed in seconds. FailureBackoffSec uint64 `protobuf:"varint,9,opt,name=failure_backoff_sec,json=failureBackoffSec,proto3" json:"failure_backoff_sec,omitempty"` // - //Set to true to enable automatic dispatch of loop out swaps. All swaps will - //be limited to the fee categories set by these parameters, and total - //expenditure will be limited to the auto out budget. - AutoLoopOut bool `protobuf:"varint,10,opt,name=auto_loop_out,json=autoLoopOut,proto3" json:"auto_loop_out,omitempty"` + //Set to true to enable automatic dispatch of swaps. All swaps will be limited + //to the fee categories set by these parameters, and total expenditure will + //be limited to the autoloop budget. + Autoloop bool `protobuf:"varint,10,opt,name=autoloop,proto3" json:"autoloop,omitempty"` // //The total budget for automatically dispatched swaps since the budget start //time, expressed in satoshis. - AutoOutBudgetSat uint64 `protobuf:"varint,11,opt,name=auto_out_budget_sat,json=autoOutBudgetSat,proto3" json:"auto_out_budget_sat,omitempty"` + AutoloopBudgetSat uint64 `protobuf:"varint,11,opt,name=autoloop_budget_sat,json=autoloopBudgetSat,proto3" json:"autoloop_budget_sat,omitempty"` // - //The start time for auto-out budget, expressed as a unix timestamp in + //The start time for autoloop budget, expressed as a unix timestamp in //seconds. If this value is 0, the budget will be applied for all //automatically dispatched swaps. Swaps that were completed before this date //will not be included in budget calculations. - AutoOutBudgetStartSec uint64 `protobuf:"varint,12,opt,name=auto_out_budget_start_sec,json=autoOutBudgetStartSec,proto3" json:"auto_out_budget_start_sec,omitempty"` + AutoloopBudgetStartSec uint64 `protobuf:"varint,12,opt,name=autoloop_budget_start_sec,json=autoloopBudgetStartSec,proto3" json:"autoloop_budget_start_sec,omitempty"` // //The maximum number of automatically dispatched swaps that we allow to be in //flight at any point in time. @@ -1730,23 +1730,23 @@ func (m *LiquidityParameters) GetFailureBackoffSec() uint64 { return 0 } -func (m *LiquidityParameters) GetAutoLoopOut() bool { +func (m *LiquidityParameters) GetAutoloop() bool { if m != nil { - return m.AutoLoopOut + return m.Autoloop } return false } -func (m *LiquidityParameters) GetAutoOutBudgetSat() uint64 { +func (m *LiquidityParameters) GetAutoloopBudgetSat() uint64 { if m != nil { - return m.AutoOutBudgetSat + return m.AutoloopBudgetSat } return 0 } -func (m *LiquidityParameters) GetAutoOutBudgetStartSec() uint64 { +func (m *LiquidityParameters) GetAutoloopBudgetStartSec() uint64 { if m != nil { - return m.AutoOutBudgetStartSec + return m.AutoloopBudgetStartSec } return 0 } @@ -2029,157 +2029,157 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 2396 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x6f, 0x23, 0xc7, - 0x11, 0x5e, 0xbe, 0x44, 0xb2, 0xf8, 0x1a, 0xb5, 0x76, 0x57, 0x14, 0x2d, 0xc3, 0xda, 0xb1, 0x37, - 0x96, 0x65, 0x7b, 0x19, 0xcb, 0x97, 0xc4, 0xb0, 0x03, 0x68, 0x29, 0xca, 0xe2, 0x46, 0x22, 0x99, - 0x21, 0xb5, 0x86, 0x83, 0x00, 0x83, 0x16, 0xd9, 0x92, 0x06, 0xe6, 0x3c, 0x3c, 0xd3, 0xdc, 0xd5, - 0xc2, 0x48, 0x02, 0x04, 0xc8, 0x39, 0x87, 0xfc, 0x83, 0xdc, 0x73, 0xcb, 0x2d, 0xf9, 0x09, 0xc9, - 0x25, 0x39, 0xe6, 0x9a, 0x4b, 0x0e, 0xf9, 0x0f, 0x41, 0x55, 0xcf, 0x0c, 0x67, 0x28, 0x52, 0x46, - 0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0xed, 0x08, 0x83, 0x8b, 0xcd, 0xe5, 0x7c, 0x7a, 0x2d, 0x54, 0xd9, 0xa8, 0x28, - 0xdb, 0x21, 0x6b, 0x30, 0x97, 0xcf, 0x89, 0x81, 0xea, 0xfe, 0x08, 0x76, 0xee, 0xc0, 0x25, 0xf7, - 0x25, 0x29, 0x52, 0xa5, 0x43, 0x8f, 0xd2, 0x87, 0x90, 0x8b, 0xca, 0x7c, 0x08, 0x8c, 0x4e, 0xa2, - 0x61, 0x2c, 0xc7, 0xbc, 0x9a, 0x59, 0xd7, 0x37, 0x92, 0xa6, 0x91, 0xbc, 0xd1, 0x40, 0xce, 0x39, - 0xbf, 0xed, 0x39, 0x27, 0x44, 0x5e, 0xd5, 0xef, 0xea, 0xa1, 0xe7, 0xbf, 0xaf, 0xdf, 0x35, 0x52, - 0x11, 0xa2, 0x70, 0xfa, 0x5f, 0x32, 0x50, 0x4b, 0x85, 0x28, 0x95, 0x2a, 0xb5, 0xad, 0x99, 0xe1, - 0x3c, 0x90, 0x37, 0xca, 0x21, 0xa5, 0x37, 0x65, 0xcf, 0xc2, 0xa1, 0x33, 0x4b, 0x93, 0x61, 0x6b, - 0x75, 0x9c, 0x27, 0xa6, 0xcf, 0x8f, 0x81, 0x59, 0xce, 0xc4, 0xb5, 0x31, 0x92, 0xe4, 0x8d, 0x2f, - 0x82, 0x1b, 0x77, 0x36, 0xa5, 0x68, 0xad, 0x19, 0x9b, 0x11, 0x67, 0x1c, 0x31, 0x10, 0x1e, 0x2f, - 0x88, 0x0b, 0x78, 0x5e, 0xc1, 0x23, 0x4e, 0x0c, 0xd7, 0xbf, 0x86, 0x9d, 0xd1, 0xba, 0x5c, 0x65, - 0x9f, 0x03, 0x78, 0x71, 0x86, 0xd2, 0x4b, 0x2a, 0x87, 0xbb, 0x77, 0x15, 0x5e, 0x64, 0xb1, 0x91, - 0xc0, 0xeb, 0xbb, 0xd0, 0x5a, 0x25, 0x5a, 0x95, 0x63, 0xfd, 0x11, 0x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 0x06, 0x89, 0x48, 0x4e, 0xcd, 0xc3, 0xad, 0xed, 0x3b, - 0xf4, 0x74, 0x76, 0xb0, 0x06, 0x5d, 0x11, 0x70, 0xd9, 0x56, 0x33, 0x30, 0x93, 0xc0, 0xee, 0x4e, - 0x71, 0x4c, 0x8f, 0xe5, 0xac, 0x1d, 0xf1, 0x5a, 0xf7, 0xb6, 0x08, 0x7d, 0x97, 0x2e, 0x7c, 0xcc, - 0x1e, 0xd2, 0x85, 0x11, 0xa0, 0xed, 0x29, 0xf9, 0xbf, 0x02, 0x36, 0xba, 0xef, 0xd6, 0xb5, 0xcd, - 0xaa, 0xf5, 0xee, 0xbd, 0x98, 0xb4, 0x41, 0xf5, 0x95, 0x97, 0x63, 0x0a, 0x0b, 0xa8, 0x26, 0xfb, - 0x0f, 0x5b, 0xbc, 0x65, 0x45, 0xb7, 0x6a, 0xbd, 0xbd, 0x86, 0x1b, 0xde, 0xd6, 0xa4, 0xdb, 0x18, - 0xd3, 0xf0, 0x36, 0x1c, 0x44, 0xda, 0x81, 0x82, 0x5d, 0x6e, 0xd0, 0xdf, 0xe0, 0x9f, 0xfe, 0x37, - 0x00, 0x00, 0xff, 0xff, 0x79, 0xf0, 0xb4, 0xfa, 0x3d, 0x17, 0x00, 0x00, + // 2389 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0xe3, 0xc6, + 0x15, 0x5f, 0x7d, 0x59, 0xd2, 0x13, 0x45, 0xd1, 0xe3, 0x5d, 0x5b, 0x56, 0x1c, 0xc4, 0xcb, 0x64, + 0x1b, 0xc7, 0x49, 0xac, 0xc6, 0x39, 0x25, 0x48, 0x0a, 0x68, 0x65, 0x39, 0x96, 0x6b, 0x4b, 0x2a, + 0x25, 0x6f, 0x90, 0xa2, 0x00, 0x31, 0x96, 0xc6, 0x16, 0x11, 0xf1, 0x23, 0xe4, 0x68, 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, 0xff, 0x96, + 0x01, 0xad, 0x3f, 0xe7, 0xff, 0x57, 0x15, 0xb0, 0x31, 0x5a, 0x8e, 0x39, 0x9e, 0xf1, 0xd7, 0xe6, + 0x84, 0xcd, 0x38, 0x45, 0x77, 0x17, 0x0c, 0xc5, 0xb6, 0x9c, 0xf6, 0x8c, 0xbf, 0x3e, 0x11, 0xb4, + 0xa8, 0x7d, 0x26, 0x50, 0xe5, 0x10, 0x45, 0xef, 0x62, 0xd4, 0x0f, 0x3c, 0xe7, 0x0f, 0x19, 0x50, + 0x7e, 0x36, 0x77, 0x39, 0x5b, 0xdf, 0x12, 0x30, 0xf0, 0x16, 0x75, 0x38, 0x8b, 0x77, 0xc0, 0x78, + 0x51, 0x83, 0x1f, 0x94, 0xf4, 0xdc, 0x8a, 0x92, 0xfe, 0x68, 0xb3, 0xcb, 0x3f, 0xda, 0xec, 0xf4, + 0xdf, 0x65, 0x84, 0xd7, 0x43, 0x35, 0x43, 0x93, 0xef, 0x83, 0x12, 0x35, 0x29, 0x33, 0xa0, 0x91, + 0xc2, 0x10, 0xc8, 0x2e, 0x35, 0xa4, 0x38, 0xe5, 0x60, 0x82, 0xe1, 0x8d, 0xc1, 0x34, 0x46, 0x86, + 0x53, 0x8e, 0xe0, 0x0d, 0x24, 0x2b, 0x3c, 0xf0, 0x36, 0x40, 0xc2, 0x96, 0x05, 0x7c, 0x67, 0x79, + 0x9c, 0x30, 0xa4, 0x34, 0x61, 0x5e, 0x2b, 0xe8, 0x7f, 0x97, 0x51, 0xf0, 0xbf, 0xaa, 0xf4, 0x1e, + 0xa8, 0x8b, 0x61, 0x07, 0x31, 0xb2, 0xbf, 0x2a, 0x5e, 0x34, 0xed, 0x08, 0xd4, 0x87, 0x61, 0x1d, + 0x91, 0x73, 0x47, 0x5a, 0xed, 0x9a, 0xe0, 0x0c, 0x05, 0x23, 0x14, 0x89, 0xf3, 0x89, 0xb0, 0x2b, + 0xbd, 0xb7, 0x99, 0xc3, 0x4d, 0x1c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a, 0xfa, 0x09, 0xef, + 0xa0, 0xf4, 0x5d, 0xb2, 0x93, 0x94, 0x9e, 0x7c, 0xc1, 0x37, 0x50, 0x15, 0x77, 0x44, 0x43, 0x6a, + 0x90, 0x88, 0xe4, 0xd4, 0x24, 0xdc, 0xd8, 0x79, 0x40, 0x4f, 0x67, 0x07, 0xa9, 0xe1, 0x15, 0x01, + 0xe5, 0x4d, 0x39, 0xfd, 0x12, 0x0e, 0xe4, 0xe1, 0xfc, 0x46, 0xf4, 0x58, 0xce, 0xda, 0xe1, 0xae, + 0xf1, 0x68, 0x8b, 0xd0, 0xf7, 0xf0, 0xc2, 0x6d, 0xf2, 0x14, 0x2f, 0x8c, 0x00, 0x4d, 0x4f, 0xca, + 0xff, 0x15, 0x90, 0xe1, 0x63, 0xb7, 0xae, 0x6d, 0x56, 0x8d, 0x77, 0x1f, 0xc5, 0xa4, 0x0d, 0xaa, + 0xaf, 0xbc, 0x5c, 0xa4, 0x30, 0x03, 0x25, 0xd9, 0x7f, 0xc8, 0xe2, 0x2d, 0x2b, 0xba, 0x55, 0xe3, + 0xed, 0x35, 0xdc, 0xf0, 0xb6, 0x3a, 0xde, 0x46, 0x88, 0x26, 0x6e, 0x13, 0x83, 0x48, 0x33, 0x90, + 0xb0, 0xeb, 0x0d, 0xfc, 0x03, 0xfc, 0xd3, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x03, 0x91, + 0x2d, 0x37, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/looprpc/client.proto b/looprpc/client.proto index 267d3e9..6a78c7f 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -783,25 +783,25 @@ message LiquidityParameters { uint64 failure_backoff_sec = 9; /* - Set to true to enable automatic dispatch of loop out swaps. All swaps will - be limited to the fee categories set by these parameters, and total - expenditure will be limited to the auto out budget. + Set to true to enable automatic dispatch of swaps. All swaps will be limited + to the fee categories set by these parameters, and total expenditure will + be limited to the autoloop budget. */ - bool auto_loop_out = 10; + bool autoloop = 10; /* The total budget for automatically dispatched swaps since the budget start time, expressed in satoshis. */ - uint64 auto_out_budget_sat = 11; + uint64 autoloop_budget_sat = 11; /* - The start time for auto-out budget, expressed as a unix timestamp in + The start time for autoloop budget, expressed as a unix timestamp in seconds. If this value is 0, the budget will be applied for all automatically dispatched swaps. Swaps that were completed before this date will not be included in budget calculations. */ - uint64 auto_out_budget_start_sec = 12; + uint64 autoloop_budget_start_sec = 12; /* The maximum number of automatically dispatched swaps that we allow to be in diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 32d5fb1..3a90098 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -494,20 +494,20 @@ "format": "uint64", "description": "The amount of time we require pass since a channel was part of a failed\nswap due to off chain payment failure until it will be considered for swap\nsuggestions again, expressed in seconds." }, - "auto_loop_out": { + "autoloop": { "type": "boolean", "format": "boolean", - "description": "Set to true to enable automatic dispatch of loop out swaps. All swaps will\nbe limited to the fee categories set by these parameters, and total\nexpenditure will be limited to the auto out budget." + "description": "Set to true to enable automatic dispatch of swaps. All swaps will be limited \nto the fee categories set by these parameters, and total expenditure will \nbe limited to the autoloop budget." }, - "auto_out_budget_sat": { + "autoloop_budget_sat": { "type": "string", "format": "uint64", "description": "The total budget for automatically dispatched swaps since the budget start\ntime, expressed in satoshis." }, - "auto_out_budget_start_sec": { + "autoloop_budget_start_sec": { "type": "string", "format": "uint64", - "description": "The start time for auto-out budget, expressed as a unix timestamp in\nseconds. If this value is 0, the budget will be applied for all\nautomatically dispatched swaps. Swaps that were completed before this date\nwill not be included in budget calculations." + "description": "The start time for autoloop budget, expressed as a unix timestamp in\nseconds. If this value is 0, the budget will be applied for all\nautomatically dispatched swaps. Swaps that were completed before this date\nwill not be included in budget calculations." }, "auto_max_in_flight": { "type": "string", diff --git a/release_notes.md b/release_notes.md index 6b1ae5b..a6c8805 100644 --- a/release_notes.md +++ b/release_notes.md @@ -20,5 +20,10 @@ This file tracks release notes for the loop client. unlocked. Previous versions would exit with an error. #### Breaking Changes +* The `AutoOut`, `AutoOutBudgetSat` and `AutoOutBudgetStartSec` fields in the + `LiquidityParameters` message used in the experimental autoloop API have + been renamed to `Autoloop`, `AutoloopBudgetSat` and `AutoloopBudgetStartSec`. +* The `autoout` flag for enabling automatic dispatch of loop out swaps has been + renamed to `autoloop` so that it can cover loop out and loop in. #### Bug Fixes From 24aa429aa09a98ada61d7de28b60f0e54eed2556 Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 3 Feb 2021 08:54:49 +0200 Subject: [PATCH 3/6] liquidity: rename ticker and default to autoloop --- liquidity/autoloop_testcontext_test.go | 4 ++-- liquidity/liquidity.go | 22 +++++++++++----------- loopd/utils.go | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/liquidity/autoloop_testcontext_test.go b/liquidity/autoloop_testcontext_test.go index 945e3ba..39c601a 100644 --- a/liquidity/autoloop_testcontext_test.go +++ b/liquidity/autoloop_testcontext_test.go @@ -91,7 +91,7 @@ func newAutoloopTestCtx(t *testing.T, parameters Parameters, testCtx.lnd.Channels = channels cfg := &Config{ - AutoOutTicker: ticker.NewForce(DefaultAutoOutTicker), + AutoloopTicker: ticker.NewForce(DefaultAutoloopTicker), LoopOutRestrictions: func(context.Context) (*Restrictions, error) { return <-testCtx.loopOutRestrictions, nil }, @@ -182,7 +182,7 @@ func (c *autoloopTestCtx) autoloop(minAmt, maxAmt btcutil.Amount, expectedSwaps []loopOutRequestResp) { // Tick our autoloop ticker to force assessing whether we want to loop. - c.manager.cfg.AutoOutTicker.Force <- testTime + c.manager.cfg.AutoloopTicker.Force <- testTime // Send a mocked response from the server with the swap size limits. c.loopOutRestrictions <- NewRestrictions(minAmt, maxAmt) diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 1891bea..183dc9a 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -96,9 +96,9 @@ const ( // suggestions as a dry-run). defaultMaxInFlight = 1 - // DefaultAutoOutTicker is the default amount of time between automated - // loop out checks. - DefaultAutoOutTicker = time.Minute * 10 + // DefaultAutoloopTicker is the default amount of time between automated + // swap checks. + DefaultAutoloopTicker = time.Minute * 10 // autoloopSwapInitiator is the value we send in the initiator field of // a swap request when issuing an automatic swap. @@ -182,10 +182,10 @@ var ( // Config contains the external functionality required to run the // liquidity manager. type Config struct { - // AutoOutTicker determines how often we should check whether we want - // to dispatch an automated loop out. We use a force ticker so that - // we can trigger autoloop in itests. - AutoOutTicker *ticker.Force + // AutoloopTicker determines how often we should check whether we want + // to dispatch an automated swap. We use a force ticker so that we can + // trigger autoloop in itests. + AutoloopTicker *ticker.Force // LoopOutRestrictions returns the restrictions that the server applies // to loop out swaps. @@ -431,12 +431,12 @@ type Manager struct { // We run this loop even if automated swaps are not currently enabled rather // than managing starting and stopping the ticker as our parameters are updated. func (m *Manager) Run(ctx context.Context) error { - m.cfg.AutoOutTicker.Resume() - defer m.cfg.AutoOutTicker.Stop() + m.cfg.AutoloopTicker.Resume() + defer m.cfg.AutoloopTicker.Stop() for { select { - case <-m.cfg.AutoOutTicker.Ticks(): + case <-m.cfg.AutoloopTicker.Ticks(): if err := m.autoloop(ctx); err != nil { log.Errorf("autoloop failed: %v", err) } @@ -528,7 +528,7 @@ func (m *Manager) autoloop(ctx context.Context) error { // ForceAutoLoop force-ticks our auto-out ticker. func (m *Manager) ForceAutoLoop(ctx context.Context) error { select { - case m.cfg.AutoOutTicker.Force <- m.cfg.Clock.Now(): + case m.cfg.AutoloopTicker.Force <- m.cfg.Clock.Now(): return nil case <-ctx.Done(): diff --git a/loopd/utils.go b/loopd/utils.go index 90b329a..5338846 100644 --- a/loopd/utils.go +++ b/loopd/utils.go @@ -36,8 +36,8 @@ func getClient(config *Config, lnd *lndclient.LndServices) (*loop.Client, func getLiquidityManager(client *loop.Client) *liquidity.Manager { mngrCfg := &liquidity.Config{ - AutoOutTicker: ticker.NewForce(liquidity.DefaultAutoOutTicker), - LoopOut: client.LoopOut, + AutoloopTicker: ticker.NewForce(liquidity.DefaultAutoloopTicker), + LoopOut: client.LoopOut, LoopOutRestrictions: func(ctx context.Context) ( *liquidity.Restrictions, error) { From 69724757ce4a292f62311a9aa0c7c61fe876feb8 Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 3 Feb 2021 08:54:50 +0200 Subject: [PATCH 4/6] multi: update autoloop labels to support both swap types --- labels/labels.go | 18 ++++++++++++++---- liquidity/autoloop_test.go | 5 +++-- liquidity/liquidity.go | 5 +++-- liquidity/liquidity_test.go | 3 ++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/labels/labels.go b/labels/labels.go index 3129249..e17f907 100644 --- a/labels/labels.go +++ b/labels/labels.go @@ -4,6 +4,8 @@ import ( "errors" "fmt" "strings" + + "github.com/lightninglabs/loop/swap" ) const ( @@ -17,6 +19,10 @@ const ( // autoOut is the label used for loop out swaps that are automatically // dispatched. autoOut = "autoloop-out" + + // autoIn is the label used for loop in swaps that are automatically + // dispatched. + autoIn = "autoloop-in" ) var ( @@ -28,10 +34,14 @@ var ( ErrReservedPrefix = errors.New("label contains reserved prefix") ) -// AutoOutLabel returns a label with the reserved prefix that identifies -// automatically dispatched loop outs. -func AutoOutLabel() string { - return fmt.Sprintf("%v: %v", Reserved, autoOut) +// AutoloopLabel returns a label with the reserved prefix that identifies +// automatically dispatched swaps depending on the type of swap being executed. +func AutoloopLabel(swapType swap.Type) string { + if swapType == swap.TypeOut { + return fmt.Sprintf("%v: %v", Reserved, autoOut) + } + + return fmt.Sprintf("%v: %v", Reserved, autoIn) } // Validate checks that a label is of appropriate length and is not in our list diff --git a/liquidity/autoloop_test.go b/liquidity/autoloop_test.go index 0cd3274..4295542 100644 --- a/liquidity/autoloop_test.go +++ b/liquidity/autoloop_test.go @@ -8,6 +8,7 @@ import ( "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwire" @@ -145,7 +146,7 @@ func TestAutoLoopEnabled(t *testing.T) { MaxMinerFee: params.MaximumMinerFee, SweepConfTarget: params.SweepConfTarget, OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()}, - Label: labels.AutoOutLabel(), + Label: labels.AutoloopLabel(swap.TypeOut), Initiator: autoloopSwapInitiator, } @@ -161,7 +162,7 @@ func TestAutoLoopEnabled(t *testing.T) { MaxMinerFee: params.MaximumMinerFee, SweepConfTarget: params.SweepConfTarget, OutgoingChanSet: loopdb.ChannelSet{chanID2.ToUint64()}, - Label: labels.AutoOutLabel(), + Label: labels.AutoloopLabel(swap.TypeOut), Initiator: autoloopSwapInitiator, } diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 183dc9a..3c717fe 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -46,6 +46,7 @@ import ( "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/funding" "github.com/lightningnetwork/lnd/lnwallet/chainfee" @@ -816,7 +817,7 @@ func (m *Manager) makeLoopOutRequest(ctx context.Context, } if autoloop { - request.Label = labels.AutoOutLabel() + request.Label = labels.AutoloopLabel(swap.TypeOut) addr, err := m.cfg.Lnd.WalletKit.NextAddr(ctx) if err != nil { @@ -882,7 +883,7 @@ func (m *Manager) checkExistingAutoLoops(ctx context.Context, var summary existingAutoLoopSummary for _, out := range loopOuts { - if out.Contract.Label != labels.AutoOutLabel() { + if out.Contract.Label != labels.AutoloopLabel(swap.TypeOut) { continue } diff --git a/liquidity/liquidity_test.go b/liquidity/liquidity_test.go index 5f46c3f..93b1cc6 100644 --- a/liquidity/liquidity_test.go +++ b/liquidity/liquidity_test.go @@ -10,6 +10,7 @@ import ( "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/lnwallet/chainfee" @@ -99,7 +100,7 @@ var ( // and restricted to a channel that we do not use in our tests. autoOutContract = &loopdb.LoopOutContract{ SwapContract: loopdb.SwapContract{ - Label: labels.AutoOutLabel(), + Label: labels.AutoloopLabel(swap.TypeOut), InitiationTime: testBudgetStart, }, OutgoingChanSet: loopdb.ChannelSet{999}, From 476ae39ce93468a0549a758d948a132138416e48 Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 3 Feb 2021 08:54:50 +0200 Subject: [PATCH 5/6] multi: make server side restrictions function generic --- liquidity/autoloop_testcontext_test.go | 5 ++++- liquidity/liquidity.go | 27 +++++++++++++------------- liquidity/liquidity_test.go | 12 ++++++------ loopd/utils.go | 20 +++++++++++++++---- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/liquidity/autoloop_testcontext_test.go b/liquidity/autoloop_testcontext_test.go index 39c601a..ec40053 100644 --- a/liquidity/autoloop_testcontext_test.go +++ b/liquidity/autoloop_testcontext_test.go @@ -8,6 +8,7 @@ import ( "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/ticker" @@ -92,7 +93,9 @@ func newAutoloopTestCtx(t *testing.T, parameters Parameters, cfg := &Config{ AutoloopTicker: ticker.NewForce(DefaultAutoloopTicker), - LoopOutRestrictions: func(context.Context) (*Restrictions, error) { + Restrictions: func(context.Context, swap.Type) (*Restrictions, + error) { + return <-testCtx.loopOutRestrictions, nil }, ListLoopOut: func() ([]*loopdb.LoopOut, error) { diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 3c717fe..9fd12da 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -188,9 +188,10 @@ type Config struct { // trigger autoloop in itests. AutoloopTicker *ticker.Force - // LoopOutRestrictions returns the restrictions that the server applies - // to loop out swaps. - LoopOutRestrictions func(ctx context.Context) (*Restrictions, error) + // Restrictions returns the restrictions that the server applies to + // swaps. + Restrictions func(ctx context.Context, swapType swap.Type) ( + *Restrictions, error) // Lnd provides us with access to lnd's rpc servers. Lnd *lndclient.LndServices @@ -467,7 +468,7 @@ func (m *Manager) GetParameters() Parameters { // SetParameters updates our current set of parameters if the new parameters // provided are valid. func (m *Manager) SetParameters(ctx context.Context, params Parameters) error { - restrictions, err := m.cfg.LoopOutRestrictions(ctx) + restrictions, err := m.cfg.Restrictions(ctx, swap.TypeOut) if err != nil { return err } @@ -588,7 +589,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) ( // Get the current server side restrictions, combined with the client // set restrictions, if any. - outRestrictions, err := m.getLoopOutRestrictions(ctx) + restrictions, err := m.getSwapRestrictions(ctx, swap.TypeOut) if err != nil { return nil, err } @@ -647,7 +648,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) ( balance := newBalances(channel) - suggestion := rule.suggestSwap(balance, outRestrictions) + suggestion := rule.suggestSwap(balance, restrictions) // We can have nil suggestions in the case where no action is // required, so we skip over them. @@ -744,14 +745,14 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) ( return inBudget, nil } -// getLoopOutRestrictions queries the server for its latest swap size -// restrictions, validates client restrictions (if present) against these -// values and merges the client's custom requirements with the server's limits -// to produce a single set of limitations for our swap. -func (m *Manager) getLoopOutRestrictions(ctx context.Context) (*Restrictions, - error) { +// getSwapRestrictions queries the server for its latest swap size restrictions, +// validates client restrictions (if present) against these values and merges +// the client's custom requirements with the server's limits to produce a single +// set of limitations for our swap. +func (m *Manager) getSwapRestrictions(ctx context.Context, swapType swap.Type) ( + *Restrictions, error) { - restrictions, err := m.cfg.LoopOutRestrictions(ctx) + restrictions, err := m.cfg.Restrictions(ctx, swapType) if err != nil { return nil, err } diff --git a/liquidity/liquidity_test.go b/liquidity/liquidity_test.go index 93b1cc6..0872394 100644 --- a/liquidity/liquidity_test.go +++ b/liquidity/liquidity_test.go @@ -121,7 +121,7 @@ func newTestConfig() (*Config, *test.LndMockServices) { ) return &Config{ - LoopOutRestrictions: func(_ context.Context) (*Restrictions, + Restrictions: func(_ context.Context, _ swap.Type) (*Restrictions, error) { return testRestrictions, nil @@ -868,7 +868,7 @@ func TestSizeRestrictions(t *testing.T) { Maximum: 10000, } - swap = loop.OutRequest{ + outSwap = loop.OutRequest{ OutgoingChanSet: loopdb.ChannelSet{chanID1.ToUint64()}, MaxPrepayRoutingFee: prepayFee, MaxMinerFee: defaultMaximumMinerFee, @@ -967,7 +967,7 @@ func TestSizeRestrictions(t *testing.T) { // our restrictions endpoint. var callCount int - cfg.LoopOutRestrictions = func(_ context.Context) ( + cfg.Restrictions = func(_ context.Context, _ swap.Type) ( *Restrictions, error) { restrictions := testCase.serverRestrictions[callCount] @@ -981,14 +981,14 @@ func TestSizeRestrictions(t *testing.T) { // and fee accordingly. var expectedSwaps []loop.OutRequest if testCase.expectedAmount != 0 { - swap.Amount = testCase.expectedAmount + outSwap.Amount = testCase.expectedAmount - swap.MaxSwapRoutingFee = ppmToSat( + outSwap.MaxSwapRoutingFee = ppmToSat( testCase.expectedAmount, defaultRoutingFeePPM, ) - expectedSwaps = append(expectedSwaps, swap) + expectedSwaps = append(expectedSwaps, outSwap) } testSuggestSwaps( diff --git a/loopd/utils.go b/loopd/utils.go index 5338846..59e8cca 100644 --- a/loopd/utils.go +++ b/loopd/utils.go @@ -7,6 +7,7 @@ import ( "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/liquidity" + "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/ticker" ) @@ -38,16 +39,27 @@ func getLiquidityManager(client *loop.Client) *liquidity.Manager { mngrCfg := &liquidity.Config{ AutoloopTicker: ticker.NewForce(liquidity.DefaultAutoloopTicker), LoopOut: client.LoopOut, - LoopOutRestrictions: func(ctx context.Context) ( - *liquidity.Restrictions, error) { + Restrictions: func(ctx context.Context, + swapType swap.Type) (*liquidity.Restrictions, error) { - outTerms, err := client.Server.GetLoopOutTerms(ctx) + if swapType == swap.TypeOut { + outTerms, err := client.Server.GetLoopOutTerms(ctx) + if err != nil { + return nil, err + } + + return liquidity.NewRestrictions( + outTerms.MinSwapAmount, outTerms.MaxSwapAmount, + ), nil + } + + inTerms, err := client.Server.GetLoopInTerms(ctx) if err != nil { return nil, err } return liquidity.NewRestrictions( - outTerms.MinSwapAmount, outTerms.MaxSwapAmount, + inTerms.MinSwapAmount, inTerms.MaxSwapAmount, ), nil }, Lnd: client.LndServices, From 68a5336362eabf891ad628d85b597b5ad66ef5e2 Mon Sep 17 00:00:00 2001 From: carla Date: Wed, 3 Feb 2021 08:54:51 +0200 Subject: [PATCH 6/6] liquidity: move logging out of suggest swaps function This function is already quite long, and will be extended in the commits to follow, so we move it to the calling function. --- liquidity/liquidity.go | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 9fd12da..f70a08a 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -512,6 +512,15 @@ func (m *Manager) autoloop(ctx context.Context) error { } for _, swap := range swaps { + // If we don't actually have dispatch of swaps enabled, log + // suggestions. + if !m.params.Autoloop { + log.Debugf("recommended autoloop: %v sats over "+ + "%v", swap.Amount, swap.OutgoingChanSet) + + continue + } + // Create a copy of our range var so that we can reference it. swap := swap loopOut, err := m.cfg.LoopOut(ctx, &swap) @@ -730,18 +739,6 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) ( } } - // If we are getting suggestions for automatically dispatched swaps, - // and they are not enabled in our parameters, we just log the swap - // suggestions and return an empty set of suggestions. - if autoloop && !m.params.Autoloop { - for _, swap := range inBudget { - log.Debugf("recommended autoloop: %v sats over "+ - "%v", swap.Amount, swap.OutgoingChanSet) - } - - return nil, nil - } - return inBudget, nil }