I have read the following in the BOLT 11 specification:
[a writer] MAY include onenfield. (Otherwise performing public-key recovery is required)
[a reader] MUST fail the payment if any mandatory field (p,h,s,n) does not have the correct length (52, 52, 52, 53).
This is confusing to me because it sounds like
n is mandatory for the reader, but not for the writer.Is what this wants to say this: IF
n exists, THEN parsing the public key correctly is so important that we MUST fail the payment if the length is wrong, since the public key will be used to verify the signature?Is that also the correct rationale?
Should this be clarified in the specification?
I tried to look through the commit history, but I only found this 1 regarding
n (and the answer to a different question I had: why is a description required? 2).
nisn't really mandatory.