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

Clarify onion spec: part 1 (the uncontroversial bits) #1181

Merged
merged 5 commits into from
Jul 17, 2024

Commits on Jul 10, 2024

  1. BOLT 4: remove obsolete references to realm

    This was from the legacy onion, and is no longer present.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    79f3d0f View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. BOLT 4: Generalize and create proper requirements for onion decryption

    There's currently a *description* of how to decrypt an onion, and some requirements
    in forwarding.  But it also applies to onion messages, so:
    
    1. Turn the description into actual enumerated requirements.
    2. Ensure the description covers both payload and messaging onions.
    3. Include both methods to apply the blinding tweak.
    4. Leave the actual handling of the extracted payload (payment vs messaging onion) to those specific sections (e.g. reporting failure)
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    1761ad5 View commit details
    Browse the repository at this point in the history
  2. BOLT 2, BOLT 4: refer to the onion decryption section in update_add_h…

    …tlc/onion message requirements.
    
    This ties it together, saying what to use as associated data, blinding, and what to do on failure.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    47d9cce View commit details
    Browse the repository at this point in the history
  3. BOLT 2, 4: rename blinding to path_key.

    Sure, it's used to derive a secret for blinding, but it's also used to derive the key
    for encrypted_recipient_data.  It's not used as a blinding factor *directly*.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    5193cbb View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Clean-up nits

    This commit doesn't change the logic at all, it simply:
    
    - removes `realm` from onion test vector
    - cleans-up markdown formatting and indents
    - fixes typos and missing parenthesis
    - consistently uses `_` instead of `-` for field names
    - fixes math formatting (including changes from lightning#1169 and lightning#1158)
    t-bast authored and rustyrussell committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    dd27d4d View commit details
    Browse the repository at this point in the history