Skip to content

Instantly share code, notes, and snippets.

@king-11
Last active May 30, 2024 15:29
Show Gist options
  • Save king-11/9b7963744d50e2e6fba7c158f9524454 to your computer and use it in GitHub Desktop.
Save king-11/9b7963744d50e2e6fba7c158f9524454 to your computer and use it in GitHub Desktop.
VLS Q&A Testing
flowchart LR
	n1((Node 1))
	n2((Node 2))
	n3((Node 3))
	n1 --> |channel 1|n2
	n2 --> |channel 2|n3
Loading

Each channel should have 100,000sats put in by node 1 for channel 1 and node 2 for channel 2

Keysend

  • n1 to n3 ample liquidity try to move 50,000 sats
  • n1 to n3 not enough liquidity now try to move 60,000 sats reset state my sending back 50,000 sats from n3

Invoice Pay

  • n1 to n3 ample liquidity generate invoice for 50,000 sats from n3
  • n1 to n3 not enough liquidity generate bolt 11 invoice for 60,000 sats from n3 reset state using a keysend back from n3 to n1 of 50,000 sats
  • generate a bolt 12 invoice from n3 pay 10,000 sats to bolt 12 invoice from n1 and n2 perform a refund transaction for both the pays

Velocity control

  • n1 to n3 keysend set policy for n2 to not allow more than 50,000 sats send 40,000 sats from n1 to n3 sent 60,000 sats from n1 to n3 should fail revert state by sending back 40,000 sats from n3 to n1

Channel Closure

  • n2 closes channel between n1 & n2 when n1 is active
  • turn off n3 and n2 closes channel n2 & n3
  • n3 wakes to find everything is good
@king-11
Copy link
Author

king-11 commented May 30, 2024

  • we can do max size of htlcs
  • max channels
  • max invoices
  • max channel size
  • max htlcs in a commitment
  • fee velocity control for max fee in a time period (L1)
  • max fee rate percentage (L2)
  • max routing fee (L2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment