From 662f954e0ff1b4809dd9208df245db10a1cc6e5a Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Tue, 3 Feb 2026 00:57:32 -0500 Subject: [PATCH] testdata: add liquidity sessions --- .../sessions/liquidity/01_loop-getparams.json | 108 ++++++++++ .../liquidity/02_loop-setparams-no-flags.json | 92 +++++++++ .../03_loop-setparams-feepercent.json | 123 +++++++++++ ...04_loop-setparams-feepercent-conflict.json | 96 +++++++++ .../05_loop-setrule-missing-threshold.json | 93 +++++++++ .../liquidity/06_loop-setrule-no-args.json | 35 ++++ .../liquidity/07_loop-suggestswaps.json | 58 ++++++ .../liquidity/08_loop-setrule-success.json | 142 +++++++++++++ .../09_loop-suggestswaps-success.json | 60 ++++++ .../liquidity/10_loop-setrule-incoming.json | 150 ++++++++++++++ .../11_loop-setrule-outgoing-type-in.json | 183 +++++++++++++++++ .../liquidity/12_loop-setrule-clear.json | 149 ++++++++++++++ .../13_loop-setparams-many-flags-error.json | 189 +++++++++++++++++ ...oop-setparams-many-flags-error-minamt.json | 191 ++++++++++++++++++ .../15_loop-setparams-many-flags.json | 176 ++++++++++++++++ .../liquidity/16_loop-setparams-destaddr.json | 145 +++++++++++++ .../liquidity/17_loop-setparams-account.json | 147 ++++++++++++++ .../18_loop-setparams-includeallpeers.json | 142 +++++++++++++ .../liquidity/19_loop-setrule-type-out.json | 152 ++++++++++++++ 19 files changed, 2431 insertions(+) create mode 100644 cmd/loop/testdata/sessions/liquidity/01_loop-getparams.json create mode 100644 cmd/loop/testdata/sessions/liquidity/02_loop-setparams-no-flags.json create mode 100644 cmd/loop/testdata/sessions/liquidity/03_loop-setparams-feepercent.json create mode 100644 cmd/loop/testdata/sessions/liquidity/04_loop-setparams-feepercent-conflict.json create mode 100644 cmd/loop/testdata/sessions/liquidity/05_loop-setrule-missing-threshold.json create mode 100644 cmd/loop/testdata/sessions/liquidity/06_loop-setrule-no-args.json create mode 100644 cmd/loop/testdata/sessions/liquidity/07_loop-suggestswaps.json create mode 100644 cmd/loop/testdata/sessions/liquidity/08_loop-setrule-success.json create mode 100644 cmd/loop/testdata/sessions/liquidity/09_loop-suggestswaps-success.json create mode 100644 cmd/loop/testdata/sessions/liquidity/10_loop-setrule-incoming.json create mode 100644 cmd/loop/testdata/sessions/liquidity/11_loop-setrule-outgoing-type-in.json create mode 100644 cmd/loop/testdata/sessions/liquidity/12_loop-setrule-clear.json create mode 100644 cmd/loop/testdata/sessions/liquidity/13_loop-setparams-many-flags-error.json create mode 100644 cmd/loop/testdata/sessions/liquidity/14_loop-setparams-many-flags-error-minamt.json create mode 100644 cmd/loop/testdata/sessions/liquidity/15_loop-setparams-many-flags.json create mode 100644 cmd/loop/testdata/sessions/liquidity/16_loop-setparams-destaddr.json create mode 100644 cmd/loop/testdata/sessions/liquidity/17_loop-setparams-account.json create mode 100644 cmd/loop/testdata/sessions/liquidity/18_loop-setparams-includeallpeers.json create mode 100644 cmd/loop/testdata/sessions/liquidity/19_loop-setrule-type-out.json diff --git a/cmd/loop/testdata/sessions/liquidity/01_loop-getparams.json b/cmd/loop/testdata/sessions/liquidity/01_loop-getparams.json new file mode 100644 index 00000000..8d1e3b37 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/01_loop-getparams.json @@ -0,0 +1,108 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "getparams", + "--network", + "regtest" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 213058408, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 212, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 212, + "kind": "stdout", + "data": { + "lines": [ + "{\n", + " \"account\": \"\",\n", + " \"account_addr_type\": \"ADDRESS_TYPE_UNKNOWN\",\n", + " \"auto_max_in_flight\": \"1\",\n", + " \"autoloop\": false,\n", + " \"autoloop_budget_last_refresh\": \"1770076824\",\n", + " \"autoloop_budget_refresh_period_sec\": \"604800\",\n", + " \"autoloop_budget_sat\": \"335544\",\n", + " \"autoloop_budget_start_sec\": \"0\",\n", + " \"autoloop_dest_address\": \"\",\n", + " \"easy_asset_params\": {},\n", + " \"easy_autoloop\": false,\n", + " \"easy_autoloop_excluded_peers\": [],\n", + " \"easy_autoloop_local_target_sat\": \"0\",\n", + " \"failure_backoff_sec\": \"86400\",\n", + " \"fast_swap_publication\": true,\n", + " \"fee_ppm\": \"20000\",\n", + " \"htlc_conf_target\": 6,\n", + " \"max_miner_fee_sat\": \"0\",\n", + " \"max_prepay_routing_fee_ppm\": \"0\",\n", + " \"max_prepay_sat\": \"0\",\n", + " \"max_routing_fee_ppm\": \"0\",\n", + " \"max_swap_amount\": \"0\",\n", + " \"max_swap_fee_ppm\": \"0\",\n", + " \"min_swap_amount\": \"0\",\n", + " \"rules\": [],\n", + " \"sweep_conf_target\": 100,\n", + " \"sweep_fee_rate_sat_per_vbyte\": \"0\"\n", + "}\n" + ] + } + }, + { + "time_ms": 213, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/02_loop-setparams-no-flags.json b/cmd/loop/testdata/sessions/liquidity/02_loop-setparams-no-flags.json new file mode 100644 index 00000000..00ab0b4f --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/02_loop-setparams-no-flags.json @@ -0,0 +1,92 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "at least one flag required to set params", + "duration": 150177446, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 5, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 149, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 150, + "kind": "stderr", + "data": { + "lines": [ + "[loop] at least one flag required to set params\n" + ] + } + }, + { + "time_ms": 150, + "kind": "exit", + "data": { + "run_error": "at least one flag required to set params" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/03_loop-setparams-feepercent.json b/cmd/loop/testdata/sessions/liquidity/03_loop-setparams-feepercent.json new file mode 100644 index 00000000..95e99cd5 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/03_loop-setparams-feepercent.json @@ -0,0 +1,123 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--feepercent", + "2" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 249608692, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 6, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 188, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 189, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 248, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 249, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/04_loop-setparams-feepercent-conflict.json b/cmd/loop/testdata/sessions/liquidity/04_loop-setparams-feepercent-conflict.json new file mode 100644 index 00000000..38fed2a7 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/04_loop-setparams-feepercent-conflict.json @@ -0,0 +1,96 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--feepercent", + "2", + "--sweeplimit", + "1" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "feepercent cannot be set with specific fee category flags", + "duration": 161206474, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 4, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 159, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 161, + "kind": "stderr", + "data": { + "lines": [ + "[loop] feepercent cannot be set with specific fee category flags\n" + ] + } + }, + { + "time_ms": 161, + "kind": "exit", + "data": { + "run_error": "feepercent cannot be set with specific fee category flags" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/05_loop-setrule-missing-threshold.json b/cmd/loop/testdata/sessions/liquidity/05_loop-setrule-missing-threshold.json new file mode 100644 index 00000000..813ddec3 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/05_loop-setrule-missing-threshold.json @@ -0,0 +1,93 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest", + "034fa8802fdc9f8c137e8f2cce2e4d30e590a1314e16bd060ac7d772dc698ff4bc" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "provide at least one flag to set rules or use the --clear flag to remove rules", + "duration": 143258905, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 2, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 142, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 143, + "kind": "stderr", + "data": { + "lines": [ + "[loop] provide at least one flag to set rules or use the --clear flag to remove rules\n" + ] + } + }, + { + "time_ms": 143, + "kind": "exit", + "data": { + "run_error": "provide at least one flag to set rules or use the --clear flag to remove rules" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/06_loop-setrule-no-args.json b/cmd/loop/testdata/sessions/liquidity/06_loop-setrule-no-args.json new file mode 100644 index 00000000..51314cba --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/06_loop-setrule-no-args.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "please set a channel id or peer pubkey for the rule update", + "duration": 1924009, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "stderr", + "data": { + "lines": [ + "[loop] please set a channel id or peer pubkey for the rule update\n" + ] + } + }, + { + "time_ms": 1, + "kind": "exit", + "data": { + "run_error": "please set a channel id or peer pubkey for the rule update" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/07_loop-suggestswaps.json b/cmd/loop/testdata/sessions/liquidity/07_loop-suggestswaps.json new file mode 100644 index 00000000..affc1baa --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/07_loop-suggestswaps.json @@ -0,0 +1,58 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "suggestswaps", + "--network", + "regtest" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "no rules set for autolooper, please set rules using the setrule command", + "duration": 178932401, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SuggestSwaps", + "event": "request", + "message_type": "looprpc.SuggestSwapsRequest", + "payload": {} + } + }, + { + "time_ms": 178, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SuggestSwaps", + "event": "error", + "error": "rpc error: code = FailedPrecondition desc = no rules set for autoloop", + "status": { + "code": 9, + "message": "no rules set for autoloop" + } + } + }, + { + "time_ms": 178, + "kind": "stderr", + "data": { + "lines": [ + "[loop] no rules set for autolooper, please set rules using the setrule command\n" + ] + } + }, + { + "time_ms": 178, + "kind": "exit", + "data": { + "run_error": "no rules set for autolooper, please set rules using the setrule command" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/08_loop-setrule-success.json b/cmd/loop/testdata/sessions/liquidity/08_loop-setrule-success.json new file mode 100644 index 00000000..08331612 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/08_loop-setrule-success.json @@ -0,0 +1,142 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest", + "--incoming_threshold", + "10", + "034fa8802fdc9f8c137e8f2cce2e4d30e590a1314e16bd060ac7d772dc698ff4bc" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 130661787, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 3, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 124, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 124, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 130, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 130, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/09_loop-suggestswaps-success.json b/cmd/loop/testdata/sessions/liquidity/09_loop-suggestswaps-success.json new file mode 100644 index 00000000..7d41dfab --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/09_loop-suggestswaps-success.json @@ -0,0 +1,60 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "suggestswaps", + "--network", + "regtest" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 137916583, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SuggestSwaps", + "event": "request", + "message_type": "looprpc.SuggestSwapsRequest", + "payload": {} + } + }, + { + "time_ms": 137, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SuggestSwaps", + "event": "response", + "message_type": "looprpc.SuggestSwapsResponse", + "payload": { + "loop_out": [], + "loop_in": [], + "disqualified": [] + } + } + }, + { + "time_ms": 137, + "kind": "stdout", + "data": { + "lines": [ + "{\n", + " \"disqualified\": [],\n", + " \"loop_in\": [],\n", + " \"loop_out\": []\n", + "}\n" + ] + } + }, + { + "time_ms": 137, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/10_loop-setrule-incoming.json b/cmd/loop/testdata/sessions/liquidity/10_loop-setrule-incoming.json new file mode 100644 index 00000000..340fd514 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/10_loop-setrule-incoming.json @@ -0,0 +1,150 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest", + "--incoming_threshold", + "40", + "125344325763072" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 204743867, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 2, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 135, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 135, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + }, + { + "channel_id": "125344325763072", + "swap_type": "LOOP_OUT", + "pubkey": "", + "type": "THRESHOLD", + "incoming_threshold": 40, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 204, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 204, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/11_loop-setrule-outgoing-type-in.json b/cmd/loop/testdata/sessions/liquidity/11_loop-setrule-outgoing-type-in.json new file mode 100644 index 00000000..6328a16d --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/11_loop-setrule-outgoing-type-in.json @@ -0,0 +1,183 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest", + "--type", + "in", + "--outgoing_threshold", + "30", + "124244814135296" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed", + "duration": 212373344, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 2, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 168, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "125344325763072", + "swap_type": "LOOP_OUT", + "pubkey": "", + "type": "THRESHOLD", + "incoming_threshold": 40, + "outgoing_threshold": 0 + }, + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 168, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "125344325763072", + "swap_type": "LOOP_OUT", + "pubkey": "", + "type": "THRESHOLD", + "incoming_threshold": 40, + "outgoing_threshold": 0 + }, + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + }, + { + "channel_id": "124244814135296", + "swap_type": "LOOP_IN", + "pubkey": "", + "type": "THRESHOLD", + "incoming_threshold": 0, + "outgoing_threshold": 30 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 212, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "error", + "error": "rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed", + "status": { + "code": 2, + "message": "channel level rules not supported for loop in swaps, only peer-level rules allowed" + } + } + }, + { + "time_ms": 212, + "kind": "stderr", + "data": { + "lines": [ + "[loop] rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed\n" + ] + } + }, + { + "time_ms": 212, + "kind": "exit", + "data": { + "run_error": "rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/12_loop-setrule-clear.json b/cmd/loop/testdata/sessions/liquidity/12_loop-setrule-clear.json new file mode 100644 index 00000000..3114845c --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/12_loop-setrule-clear.json @@ -0,0 +1,149 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest", + "--clear", + "125344325763072" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 232507711, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 150, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "125344325763072", + "swap_type": "LOOP_OUT", + "pubkey": "", + "type": "THRESHOLD", + "incoming_threshold": 40, + "outgoing_threshold": 0 + }, + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 150, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 231, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 232, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/13_loop-setparams-many-flags-error.json b/cmd/loop/testdata/sessions/liquidity/13_loop-setparams-many-flags-error.json new file mode 100644 index 00000000..a6b7389e --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/13_loop-setparams-many-flags-error.json @@ -0,0 +1,189 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--maxswapfee", + "0.1", + "--maxroutingfee", + "0.1", + "--maxprepayfee", + "0.1", + "--maxprepay", + "1000", + "--maxminer", + "1000", + "--sweepconf", + "10", + "--failurebackoff", + "60", + "--autoloop", + "--autobudget", + "1000", + "--autobudgetrefreshperiod", + "1h", + "--autoinflight", + "2", + "--minamt", + "1000", + "--maxamt", + "200000", + "--htlc_conf", + "2", + "--easyautoloop", + "--localbalancesat", + "1000000", + "--easyautoloop_excludepeer", + "0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7", + "--fast" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte", + "duration": 325173938, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 3, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 276, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 276, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "1000", + "max_swap_amount": "200000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + } + }, + { + "time_ms": 324, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "error", + "error": "rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte", + "status": { + "code": 2, + "message": "sweep fee rate limit must be > 1 sat/vByte" + } + } + }, + { + "time_ms": 325, + "kind": "stderr", + "data": { + "lines": [ + "[loop] rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte\n" + ] + } + }, + { + "time_ms": 325, + "kind": "exit", + "data": { + "run_error": "rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/14_loop-setparams-many-flags-error-minamt.json b/cmd/loop/testdata/sessions/liquidity/14_loop-setparams-many-flags-error-minamt.json new file mode 100644 index 00000000..3a3567a5 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/14_loop-setparams-many-flags-error-minamt.json @@ -0,0 +1,191 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--sweeplimit", + "2", + "--maxswapfee", + "0.1", + "--maxroutingfee", + "0.1", + "--maxprepayfee", + "0.1", + "--maxprepay", + "1000", + "--maxminer", + "1000", + "--sweepconf", + "10", + "--failurebackoff", + "60", + "--autoloop", + "--autobudget", + "1000", + "--autobudgetrefreshperiod", + "1h", + "--autoinflight", + "2", + "--minamt", + "1000", + "--maxamt", + "200000", + "--htlc_conf", + "2", + "--easyautoloop", + "--localbalancesat", + "1000000", + "--easyautoloop_excludepeer", + "0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7", + "--fast" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "run_error": "rpc error: code = Unknown desc = minimum swap amount is less than server minimum", + "duration": 273083406, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 191, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 191, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "1000", + "max_swap_amount": "200000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + } + }, + { + "time_ms": 272, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "error", + "error": "rpc error: code = Unknown desc = minimum swap amount is less than server minimum", + "status": { + "code": 2, + "message": "minimum swap amount is less than server minimum" + } + } + }, + { + "time_ms": 272, + "kind": "stderr", + "data": { + "lines": [ + "[loop] rpc error: code = Unknown desc = minimum swap amount is less than server minimum\n" + ] + } + }, + { + "time_ms": 273, + "kind": "exit", + "data": { + "run_error": "rpc error: code = Unknown desc = minimum swap amount is less than server minimum" + } + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/15_loop-setparams-many-flags.json b/cmd/loop/testdata/sessions/liquidity/15_loop-setparams-many-flags.json new file mode 100644 index 00000000..31141db2 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/15_loop-setparams-many-flags.json @@ -0,0 +1,176 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--sweeplimit", + "2", + "--maxswapfee", + "0.1", + "--maxroutingfee", + "0.1", + "--maxprepayfee", + "0.1", + "--maxprepay", + "1000", + "--maxminer", + "1000", + "--sweepconf", + "10", + "--failurebackoff", + "60", + "--autoloop", + "--autobudget", + "1000", + "--autobudgetrefreshperiod", + "1h", + "--autoinflight", + "2", + "--minamt", + "500000", + "--maxamt", + "1000000", + "--htlc_conf", + "2", + "--easyautoloop", + "--localbalancesat", + "1000000", + "--easyautoloop_excludepeer", + "0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7", + "--fast" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 184771728, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 3, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 160, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "20000", + "sweep_fee_rate_sat_per_vbyte": "0", + "max_swap_fee_ppm": "0", + "max_routing_fee_ppm": "0", + "max_prepay_routing_fee_ppm": "0", + "max_prepay_sat": "0", + "max_miner_fee_sat": "0", + "sweep_conf_target": 100, + "failure_backoff_sec": "86400", + "autoloop": false, + "autoloop_budget_sat": "335544", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "1", + "min_swap_amount": "0", + "max_swap_amount": "0", + "htlc_conf_target": 6, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "604800", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": false, + "easy_autoloop_local_target_sat": "0", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 161, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + } + }, + { + "time_ms": 182, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 184, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/16_loop-setparams-destaddr.json b/cmd/loop/testdata/sessions/liquidity/16_loop-setparams-destaddr.json new file mode 100644 index 00000000..f99b78b1 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/16_loop-setparams-destaddr.json @@ -0,0 +1,145 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--destaddr", + "bcrt1pfu9g59aqtxd39653f76y4c8z7r3t9tmcvrvhl57a3dgj3epdwxdqcd9fpw" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 235471909, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 2, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 223, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + }, + { + "time_ms": 224, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "bcrt1pfu9g59aqtxd39653f76y4c8z7r3t9tmcvrvhl57a3dgj3epdwxdqcd9fpw", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + } + }, + { + "time_ms": 234, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 235, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/17_loop-setparams-account.json b/cmd/loop/testdata/sessions/liquidity/17_loop-setparams-account.json new file mode 100644 index 00000000..f91d0cea --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/17_loop-setparams-account.json @@ -0,0 +1,147 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--account", + "default", + "--account_addr_type", + "p2tr" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 264493138, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 1, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 249, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "bcrt1pfu9g59aqtxd39653f76y4c8z7r3t9tmcvrvhl57a3dgj3epdwxdqcd9fpw", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "", + "account_addr_type": "ADDRESS_TYPE_UNKNOWN", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + }, + { + "time_ms": 250, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "default", + "account_addr_type": "TAPROOT_PUBKEY", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + } + }, + { + "time_ms": 264, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 264, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/18_loop-setparams-includeallpeers.json b/cmd/loop/testdata/sessions/liquidity/18_loop-setparams-includeallpeers.json new file mode 100644 index 00000000..911d68ef --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/18_loop-setparams-includeallpeers.json @@ -0,0 +1,142 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setparams", + "--network", + "regtest", + "--easyatutoloop_includeallpeers" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 304215261, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 2, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 263, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "default", + "account_addr_type": "TAPROOT_PUBKEY", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [ + "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3" + ] + } + } + }, + { + "time_ms": 271, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770076824", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "default", + "account_addr_type": "TAPROOT_PUBKEY", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 303, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 304, + "kind": "exit", + "data": {} + } + ] +} diff --git a/cmd/loop/testdata/sessions/liquidity/19_loop-setrule-type-out.json b/cmd/loop/testdata/sessions/liquidity/19_loop-setrule-type-out.json new file mode 100644 index 00000000..ea0a3782 --- /dev/null +++ b/cmd/loop/testdata/sessions/liquidity/19_loop-setrule-type-out.json @@ -0,0 +1,152 @@ +{ + "metadata": { + "args": [ + "/home/user/bin/loop", + "setrule", + "--network", + "regtest", + "--type", + "out", + "--incoming_threshold", + "20", + "125344325763072" + ], + "env": { + "HOME": "/home/user" + }, + "version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845", + "duration": 195037901, + "clock_start_unix": 1769407086 + }, + "events": [ + { + "time_ms": 3, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "request", + "message_type": "looprpc.GetLiquidityParamsRequest", + "payload": {} + } + }, + { + "time_ms": 137, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/GetLiquidityParams", + "event": "response", + "message_type": "looprpc.LiquidityParameters", + "payload": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770092424", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "default", + "account_addr_type": "TAPROOT_PUBKEY", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + }, + { + "time_ms": 137, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "request", + "message_type": "looprpc.SetLiquidityParamsRequest", + "payload": { + "parameters": { + "rules": [ + { + "channel_id": "0", + "swap_type": "LOOP_OUT", + "pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8", + "type": "THRESHOLD", + "incoming_threshold": 10, + "outgoing_threshold": 0 + }, + { + "channel_id": "125344325763072", + "swap_type": "LOOP_OUT", + "pubkey": "", + "type": "THRESHOLD", + "incoming_threshold": 20, + "outgoing_threshold": 0 + } + ], + "fee_ppm": "0", + "sweep_fee_rate_sat_per_vbyte": "2", + "max_swap_fee_ppm": "1000", + "max_routing_fee_ppm": "1000", + "max_prepay_routing_fee_ppm": "1000", + "max_prepay_sat": "1000", + "max_miner_fee_sat": "1000", + "sweep_conf_target": 10, + "failure_backoff_sec": "60", + "autoloop": true, + "autoloop_budget_sat": "1000", + "autoloop_budget_start_sec": "0", + "auto_max_in_flight": "2", + "min_swap_amount": "500000", + "max_swap_amount": "1000000", + "htlc_conf_target": 2, + "autoloop_dest_address": "", + "autoloop_budget_refresh_period_sec": "3600", + "autoloop_budget_last_refresh": "1770092424", + "easy_autoloop": true, + "easy_autoloop_local_target_sat": "1000000", + "account": "default", + "account_addr_type": "TAPROOT_PUBKEY", + "easy_asset_params": {}, + "fast_swap_publication": true, + "easy_autoloop_excluded_peers": [] + } + } + } + }, + { + "time_ms": 194, + "kind": "grpc", + "data": { + "method": "/looprpc.SwapClient/SetLiquidityParams", + "event": "response", + "message_type": "looprpc.SetLiquidityParamsResponse", + "payload": {} + } + }, + { + "time_ms": 195, + "kind": "exit", + "data": {} + } + ] +}