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

lsps2: framework for scid management #112

Closed
wants to merge 1 commit into from
Closed

lsps2: framework for scid management #112

wants to merge 1 commit into from

Conversation

JssDWt
Copy link
Collaborator

@JssDWt JssDWt commented Aug 7, 2023

Implement #72

There's a background watcher that scans the lightning node for in-use scids. These scids are cached in memory.
There's a table containing the scids in use for the LSP.

ScidService.ReserveNewScid attempts to reserve an unused scid. It tries a few times, just in case it runs into a collision.

To tie this PR together into something working:

  • Initialize a lightning.ScidCache
  • Run LightningClient.WatchScids on either the CLN or LND client
  • Initialize a jit.ScidCleaner and start it
  • Initialize a jit.ScidService
  • Call ScidService.ReserveNewScid to reserve a scid

Order of pull requests:

  1. Lsps0 implementation #114
  2. lsps2: implement lsps2.get_versions #115
  3. Implement lsps2.get_info #116
  4. (this PR) lsps2: framework for scid management #112

@JssDWt JssDWt changed the title jit: framework for scid management lsps2: framework for scid management Aug 7, 2023
@JssDWt JssDWt marked this pull request as ready for review August 14, 2023 11:29
@JssDWt JssDWt marked this pull request as draft August 14, 2023 11:32
There's a background watcher that scans the lightning node for in-use scids. These scids are cached in memory.
There's a table containing the scids in use for the LSP.

`ScidService.ReserveNewScid` attempts to reserve an unused scid. It tries a few times, just in case it runs into a collision.

To tie this PR together into something working:
- Initialize a `lightning.ScidCache`
- Run `LightningClient.WatchScids` on either the CLN or LND client
- Initialize a `jit.ScidCleaner` and start it
- Initialize a `jit.ScidService`
- Call `ScidService.ReserveNewScid` to reserve a scid
@JssDWt
Copy link
Collaborator Author

JssDWt commented Aug 18, 2023

Closing this, because it's unnecessary due to #120.
Only the cleanup of buy registrations needs to be handled still.

@JssDWt JssDWt closed this Aug 21, 2023
@JssDWt JssDWt deleted the lsps2-scids branch November 16, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant