stakwork / sphinx-key

Lightning hardware signer on ESP32
28 stars 1 forks source link

client added client list before finishing lss initialization #97

Closed irriden closed 12 months ago

irriden commented 1 year ago

If the signer crashes during the reconnect dance, broker gets stuck trying to finish the reconnect dance with that specific client ID, and the signer now under a different client ID never goes through the reconnect dance, as described in #96.

Nonetheless, the client is added to the client list. Hence when broker iterates through the full list of clients attempting to send a vls message and get a good response, it sends one to the signer even though the signer is expecting an LSS message.

Signer then complains as follows, as broker keeps looping over an iteration of the full client list, sending a vls message to each one of them.

 W (37179) sphinx_key::core::lss: failed server_pubkey_from_event not an LSS msg
 W (70509) sphinx_key::core::lss: failed server_pubkey_from_event not an LSS msg
 W (73219) sphinx_key::core::lss: failed server_pubkey_from_event not an LSS msg
 W (109269) sphinx_key::core::lss: failed server_pubkey_from_event not an LSS msg
Evanfeenstra commented 12 months ago

Its up to the signer to know if LSS init failed, and restart if so