Error Codes for LN



Summary:

In an email exchange between Rusty and Carla, they discussed the implementation of more specific error codes. They suggested adding TLV fields after the data field to achieve this and also talked about how to support nodes that have not upgraded. Rusty proposed a straw proposal which included types such as erroneous_message, erroneous_fieldnum, and suggested_value. The new error message provides an error code that tells exactly what has gone wrong, and metadata pointing to the HTLC with an invalid signature. Carla suggested adding an error_code enum where timeout is one of the cases. Rusty also proposed adding the TLV to warnings.The context then shifts to fee updates and a misguided feature bit. The author suggests that if Alice requires a feature bit which Bob doesn't offer, it is on Bob to comply. The author also notes that all issues with the exception of timeouts can be expressed in the form "problem is this message, this field" and suggests having a special TLV case for timeouts in the message. Rusty believes that the spec indicates that senders/recipients of errors `MUST` fail the channel referenced in the error, but he thinks this isn't practical. He adds that the vast majority of errors are "contact your developer, peer says we did something illegal". The email exchange also includes a link to the relevant GitHub page.


Updated on: 2023-06-03T03:48:05.714082+00:00