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

Api improvements #131

Merged
merged 32 commits into from
Oct 6, 2022
Merged

Api improvements #131

merged 32 commits into from
Oct 6, 2022

Commits on Sep 15, 2022

  1. log: Set timezone to UTC

    nepet committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    139fdd9 View commit details
    Browse the repository at this point in the history
  2. policy: Add minimum swap amount

    We already use a lower boundary in sat to perform a swap due to
    economical reasons. We want to be able to return this value via the
    api, so this commit moves this value to the policy where it belongs.
    The MinSwapAmountMsat is now in msat, set to a default of
    100000000 msat and can NOT be overridden in the policy file.
    We might change this in the future.
    
    This might change at some point in the future.
    nepet committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    9c40271 View commit details
    Browse the repository at this point in the history
  3. policy: Add missing locks on getters

    We missed some mutex locks on the getters.
    nepet committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    cb0db1a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4786be2 View commit details
    Browse the repository at this point in the history
  5. policy: Add json tags for json snake case to the policy struct

    GLightning returned the struct in camel case but we want to use
    snake case for the returned values / structs.
    nepet committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    4597d62 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4342cb9 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. Configuration menu
    Copy the full SHA
    4d59d20 View commit details
    Browse the repository at this point in the history
  2. dev: Rework of the cln node tools

    We want a cleaner toolkit for developing and an easy way to setup
    a linear network of 2 cln nodes.
    nepet committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    8747c50 View commit details
    Browse the repository at this point in the history
  3. dev: Rework of the lnd node tools

    We want a cleaner toolkit for developing and an easy way to setup
    a linear network of 2 lnd nodes.
    nepet committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    ee69e0a View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2022

  1. api: Use the same swap list in return for lnd and cln

    We want to return the same data for the listswap calls on both
    peerswapd for lnd and the cln peerswap plugin. We use the protos
    and the generated stubs to ensure the same return values on the
    listswaps, listactiveswaps, swapin and swapout commands.
    nepet committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    50b4b64 View commit details
    Browse the repository at this point in the history
  2. dev: Rework of the peerswapd tools

    We want a cleaner toolkit for developing and an easy way to setup
    a linear network of 2 lnd nodes.
    nepet committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    598d8d7 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. policy: Add pubkey validation on peer lists

    We want to ensure that the string that is written to the policy
    file lists (suspicious_peers and allowlisted_peers) is not empty
    or not a valid hex representation of a pubkey.
    nepet committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    271be8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d211fab View commit details
    Browse the repository at this point in the history
  3. swap: Clean up unused garbage

    nepet committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    8ccc600 View commit details
    Browse the repository at this point in the history
  4. policy: Add allow_new_swaps field to policy file

    We used to handle the global allowance of swaps non persistent in
    the swap service. It is better to have all these kind of
    constraints (this is a kill-switch) in one place.
    
    This also adds some methods to set and get the value.
    nepet committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    c2ed95e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    216cd75 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5fd9f99 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cb39137 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    834148f View commit details
    Browse the repository at this point in the history
  9. proto: Add a json marshaler to the policy message

    When we generate the stubs from the proto the structs gets tagged
    with json:"omitempty". When we pass this message to a json
    marshaler for e.g. printing to stdout, the marshaler omits empty
    fields or fields that contain the default value for their type.
    What we want is to print all fields even if they are empty. This
    adds a custom marshaler that is configured to emit unpopulated
    values.
    nepet committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    7c82c6c View commit details
    Browse the repository at this point in the history
  10. cln: Change return value of allowswaprequests call

    We want to return the policy struct. This uses the generated struct
    from the peerswaprpc protos.
    nepet committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    19e6c13 View commit details
    Browse the repository at this point in the history
  11. swap: Use the policy to detrmine if a new swap is allowed

    We now use the policy instead of the inmemory map to determine if
    we can start a new swap or not.
    
    In the case of a incoming swap request from a peer, this check is
    moved to the CheckRequestWrapperAction as we also want to send our
    peer a cancel message if we do not allow for swaps atm.
    
    Prior this commit the check was performed in the service methods
    and did not send a cancel message to the peer so that the peer
    could get stuck.
    nepet committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    0aedd55 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b89dcdf View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    99da20e View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2022

  1. lnd: Fix wrong error message

    nepet committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    575d88d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c06d22e View commit details
    Browse the repository at this point in the history
  3. lnd: Add custom marshaling options to the grpc rest gateway

    We want to enforce snake case.
    nepet committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    a85680f View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2022

  1. cln: Remove resendmsg command

    This was a command for debugging purposes but somehow made it to
    the public api.
    nepet committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    7d89d32 View commit details
    Browse the repository at this point in the history
  2. swap: Add a check if the swap is done on data write failure

    When writing data to the store fails, we return a failure. If this
    happens on swap creation we want the swap to be finished so that
    we can start a new swap
    nepet committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    e9dc2b4 View commit details
    Browse the repository at this point in the history
  3. cln: Add serialization of the getswap command return

    The enums role and type have been returned as int values. For
    a better human readability we now return them as string
    nepet committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    90362f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    81ea6ec View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Configuration menu
    Copy the full SHA
    86628e4 View commit details
    Browse the repository at this point in the history