stakwork/sphinx-key

client list grows without bound

Closed this issue · 0 comments

As of 7e290da, when a client reconnects under a new client ID, the old client ID will remain forever in the client list.

This can make it very long to iterate through the full list of clients when publishing to all clients in pub_and_wait.

Instead, each client ID could have a prefix that is a "device identifier" - and remains fixed across reconnections.

The "client list" could then be a map, where the key is the device identifier, and the value is the session identifier - that is generated at random every time the signer reconnects.

In pub_and_wait, broker would then be iterating over a list of the latest client IDs that successfully went through the LSS reconnect dance.