Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: proposed integration of sim-ln in polar #829

Open
Extheoisah opened this issue Jan 17, 2024 · 5 comments · May be fixed by #868
Open

Feature Request: proposed integration of sim-ln in polar #829

Extheoisah opened this issue Jan 17, 2024 · 5 comments · May be fixed by #868
Labels
enhancement New feature or request

Comments

@Extheoisah
Copy link

I am opening this issue to propose the integration of sim-ln in Polar for automated payment activity generation between running nodes.

The requirements to add sim-ln are:

  • Mount a volume containing macaroons and certs for each node
  • generate a config file that outlines node access and desired activity (this is done intuitively in the UI)
  • Pull the sim-ln image to run the simulation using the generated config and attached docker volume

The first step involves adding activity generation with user-defined payment flows. The simulator can also generate random activity based on the open channels.

I have started development of this feature in this branch and plan to open a draft pull request soon.

Below is the expected flow with screenshots of where development is ATM.

  1. The image below shows the addition of two buttons to give users the option to choose between the Network Designer (default) and the Activity Designer
Screenshot 2024-01-17 at 21 29 59
  1. When the activity designer button is clicked, you get an activity configuration designer UI (if you don't have existing activities) or a list of previously configured activities. Activities are tied to networks and cannot be used between different networks.
Screenshot 2024-01-17 at 21 29 00
  1. Here's another view of already activities. The plus icon allows you to duplicate the existing configuration after saving it. You can start the simulation using the start button and it will
    • create a docker volume with the saved activities,
    • create a simulation config
    • pull the sim-ln image (if not downloaded already) and run the simulation using the config
Screenshot 2024-01-17 at 21 32 48

Ideas and criticism are welcome. I hope this excites you as it does me.

@Extheoisah Extheoisah added the enhancement New feature or request label Jan 17, 2024
@jamaljsr
Copy link
Owner

Wow! This looks very cool. Great work on this so far 🔥

Thanks for opening this up for discussion early in your development. I would like to provide some feedback.

  • Mount a volume containing macaroons and certs for each node

Polar currently uses volumes that are mapped to directories on the host machine. The sim-ln container should be able to access all of the other nodes volumes (certs/macaroons) simply by mapping the same dirs in it's container.

  1. The image below shows the addition of two buttons to give users the option to choose between the Network Designer (default) and the Activity Designer

While i do like the look of the icon toggles, I'd worry that not many people would notice them there. This activities configuration may standout more if you had two tabs at the top, one for "Network" and the other for "Simulation" (or "Activities").

Here's another view of already activities. The plus icon allows you to duplicate the existing configuration after saving it. You can start the simulation using the start button and it will

  1. What is up arrow icon next to "Add Activities" at the top?
  2. It may be more intuitive to put the duplicate button in the list of existing activities. It could be a copy icon to the left of the delete icon. Otherwise, the user has to first click on an existing activity, then click on the plus icon to duplicate it.
  3. I'd move the "Save" button to the right of the "Cancel" button. I've followed a standard throughout the app to put the primary button on the bottom right.
  4. I'd also suggest dropping the red border around the "Cancel" button as it should be somewhat muted. Take a look at the other cancel buttons throughout the app (ex: Open Channel, Create Invoice, etc.)

@Extheoisah
Copy link
Author

I'm glad you like the proposal. In light of that, I'd open a draft pr as soon as possible.
.
.
.

The sim-ln container should be able to access all of the other nodes volumes (certs/macaroons) simply by mapping the same dirs in it's container.

Yes, this is the direction I also have in mind to take 🤠

While i do like the look of the icon toggles, I'd worry that not many people would notice them there. This activities configuration may standout more if you had two tabs at the top, one for "Network" and the other for "Simulation" (or "Activities").

That's a valid point. I'll make the necessary changes. Do you prefer "Simulation" to "Activities"?

What is up arrow icon next to "Add Activities" at the top?

To hide/show the activity configuration form. The idea is that if there are existing simulation activities in a network, we hide the config form to better display the existing activities. Otherwise, we show the form.

It may be more intuitive to put the duplicate button in the list of existing activities. It could be a copy icon to the left of the delete icon. Otherwise, the user has to first click on an existing activity, then click on the plus icon to duplicate it.

I'd also suggest dropping the red border around the "Cancel" button as it should be somewhat muted. Take a look at the other cancel buttons throughout the app (ex: Open Channel, Create Invoice, etc.)

This makes sense. Will do that.

I'd move the "Save" button to the right of the "Cancel" button. I've followed a standard throughout the app to put the primary button on the bottom right.

Sure.

@jamaljsr
Copy link
Owner

That's a valid point. I'll make the necessary changes. Do you prefer "Simulation" to "Activities"?

I think term "Activities" is a bit vague without additional context. It may be better to use something more specific that conveys "simulate routing activity on the nodes" in a word or two. I don't have any strong opinions on what term to use other than for it to be intuitive. Some quick ideas I have are Simulation, Simulations, Simulate, SimLN, Auto-Routing, Auto-Pay. Maybe you can ask the SimLN team if they have a preference. Since this will be the entry point into the feature, it makes sense to put a bit of thought into it.

@carlaKC
Copy link

carlaKC commented Jan 19, 2024

Maybe you can ask the SimLN team if they have a preference.

In from the sidelines here, but no strong preference on our end either - Auto-Pay seems pretty cool to me 😎

@okjodom
Copy link

okjodom commented Jan 23, 2024

Ideas and criticism are welcome. I hope this excites you as it does me.

This is exciting! eventually including some UX for reporting simulation results either while running live or for past simulations would be cool

@Extheoisah Extheoisah linked a pull request Apr 3, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants