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

Add offer manager #2566

Merged
merged 23 commits into from Mar 27, 2023
Merged

Add offer manager #2566

merged 23 commits into from Mar 27, 2023

Commits on Feb 17, 2023

  1. Add offer manager

    Because offers are a very generic mechanism, handling them can require interacting with an inventory system (do we actually have the quantity that the payer is requesting) or other such systems which do not have their place inside eclair. For this reason offer handlers must be implemented as plugins that communicate with the offer manager.
    On startup, the offer handlers must register their offers with the offer manager, the offer manager will then forward the invoice requests and blinded payments to the relevant offer handler for approval.
    thomash-acinq committed Feb 17, 2023
    Copy the full SHA
    938df74 View commit details
    Browse the repository at this point in the history
  2. Integration tests

    thomash-acinq committed Feb 17, 2023
    Copy the full SHA
    4db3e31 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2023

  1. Copy the full SHA
    eeecd08 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    7828d22 View commit details
    Browse the repository at this point in the history
  3. No Try

    thomash-acinq committed Feb 24, 2023
    Copy the full SHA
    07b674f View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. Copy the full SHA
    7e91935 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. Make tests pass

    thomash-acinq committed Mar 3, 2023
    Copy the full SHA
    ef8bad0 View commit details
    Browse the repository at this point in the history
  2. Move tests

    thomash-acinq committed Mar 3, 2023
    Copy the full SHA
    a8a29fa View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. More documentation

    thomash-acinq committed Mar 6, 2023
    Copy the full SHA
    e994f66 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Refactor MultiPartHandler

    - remove unnecessary `Try`
    - rename `GetIncomingPaymentActor` commands
    - restore standard -> blinded failure check
    t-bast authored and thomash-acinq committed Mar 21, 2023
    Copy the full SHA
    2bd6e10 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0e222fd View commit details
    Browse the repository at this point in the history
  3. pluginData

    thomash-acinq committed Mar 21, 2023
    Copy the full SHA
    fa23e17 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    439e4ef View commit details
    Browse the repository at this point in the history
  5. PaymentsDb

    thomash-acinq committed Mar 21, 2023
    Copy the full SHA
    a105a75 View commit details
    Browse the repository at this point in the history
  6. timeout

    thomash-acinq committed Mar 21, 2023
    Copy the full SHA
    cdedec2 View commit details
    Browse the repository at this point in the history
  7. format code

    thomash-acinq committed Mar 21, 2023
    Copy the full SHA
    82d7579 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. DummyBolt12Invoice

    thomash-acinq committed Mar 22, 2023
    Copy the full SHA
    e78ae1c View commit details
    Browse the repository at this point in the history
  2. pathToSender

    thomash-acinq committed Mar 22, 2023
    Copy the full SHA
    a5ea308 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    5f3c4d6 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    8d9c79f View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2023

  1. Rename and document DummyBolt12Invoice

    Dummy is usually used for test or invalid data, whereas here we're just
    storing a minimal version of the Bolt 12 invoice, so we rename it
    MinimalBolt12Invoice.
    
    We also add an explicit constructor for it that forces callers to provide
    the data we expect to store.
    
    Note that we remove the `features` field: using `nodeParams.features`
    could be incorrect if the invoice_request's features don't include some
    of our node's optional features. This is unused now anyway, but more
    future-proof this way.
    t-bast committed Mar 27, 2023
    Copy the full SHA
    1336f6c View commit details
    Browse the repository at this point in the history
  2. Refactor OfferManager

    This commit refactors the offer manager without any meaningful change
    in the business logic itself:
    
    - move types to a separate file to isolate codec details
    - make plugin data optional
    - add debug logs in failure cases
    - let plugin specify the `invoice_error` message
    - avoid repeated calls to `Behaviors.setup`
    t-bast committed Mar 27, 2023
    Copy the full SHA
    6c13439 View commit details
    Browse the repository at this point in the history
  3. Refactor and add tests

    - split OfferManager tests
    - add more tests to the OfferManager
    - remove test duplication in MultiPartHandlerSpec
    - refactor BlindedPaymentSpec
    t-bast committed Mar 27, 2023
    Copy the full SHA
    24d53fd View commit details
    Browse the repository at this point in the history