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

Direct Channel Checks (Updated) #1027

Closed
kilrau opened this issue Jun 11, 2019 · 4 comments · Fixed by #1065 or #1347
Closed

Direct Channel Checks (Updated) #1027

kilrau opened this issue Jun 11, 2019 · 4 comments · Fixed by #1065 or #1347
Assignees
Labels
P1 top priority swaps

Comments

@kilrau
Copy link
Contributor

kilrau commented Jun 11, 2019

  • similar to sanity swaps
@kilrau kilrau added raiden P1 top priority swaps labels Jun 11, 2019
@kilrau kilrau changed the title Ensure that we have a direct channel with a WETH Ensure that we have a direct channel for raiden Jun 24, 2019
sangaman added a commit that referenced this issue Jun 25, 2019
This adds logic to check that we have a direct channel with a peer
before enabling trading for a given Raiden token. Currently multi-hop
Raiden payments are not well supported, and this will prevent any
attempts to swap Raiden tokens without a direct channel.

Closes #1027.
sangaman added a commit that referenced this issue Jul 16, 2019
This adds logic to check that we have a direct channel with a peer with
sufficient balance for raiden currencies before accepting or proposing a
swap. Currently multi-hop Raiden payments are not well supported, and
failed payments are not handled well in Raiden. This will prevent any
attempts to swap Raiden tokens without a direct channel.

Closes #1027.
sangaman added a commit that referenced this issue Jul 17, 2019
This adds logic to check that we have a direct channel with a peer with
sufficient balance for raiden currencies before accepting or proposing a
swap. Currently multi-hop Raiden payments are not well supported, and
failed payments are not handled well in Raiden. This will prevent any
attempts to swap Raiden tokens without a direct channel.

Closes #1027.
sangaman added a commit that referenced this issue Jul 17, 2019
This adds logic to check that we have a direct channel with a peer with
sufficient balance for raiden currencies before accepting or proposing a
swap. Currently multi-hop Raiden payments are not well supported, and
failed payments are not handled well in Raiden. This will prevent any
attempts to swap Raiden tokens without a direct channel.

Closes #1027.
sangaman added a commit that referenced this issue Jul 17, 2019
This adds logic to check that we have a direct channel with a peer with
sufficient balance for raiden currencies before accepting or proposing a
swap. Currently multi-hop Raiden payments are not well supported, and
failed payments are not handled well in Raiden. This will prevent any
attempts to swap Raiden tokens without a direct channel.

Closes #1027.
sangaman added a commit that referenced this issue Jul 17, 2019
This adds logic to check that we have a direct channel with a peer with
sufficient balance for raiden currencies before accepting or proposing a
swap. Currently multi-hop Raiden payments are not well supported, and
failed payments are not handled well in Raiden. This will prevent any
attempts to swap Raiden tokens without a direct channel.

Closes #1027.
@kilrau
Copy link
Contributor Author

kilrau commented Nov 29, 2019

As just discussed in the call we want to have the check on receiving an order if we have a direct channel with raiden. Issue raised by @offerm

@kilrau kilrau reopened this Nov 29, 2019
@sangaman
Copy link
Collaborator

sangaman commented Dec 3, 2019

Let's discuss this more today, some thoughts I have:

  • Checking on every order received may result in a lot of calls with heavy load.
  • If we detect no channel, we'd want to remove all orders for that peer. Maybe we would want periodic checks (starting with the handshake) to occur to account for existing orders?
  • We make this check already before we attempt to execute an order, in case of raiden when we detect no direct channels we can deactivate the pair and drop all orders.

@kilrau
Copy link
Contributor Author

kilrau commented Dec 3, 2019

Maybe we would want periodic checks (starting with the handshake) to occur

How about we store the "direct" channel info as peer property and discard orders which involve tokens, where this property is false? Not querying raiden for every order...

And yes, I think it makes sense to periodically hit https://raiden-network.readthedocs.io/en/latest/rest_api.html#get--api-(version)-channels-(token_address) and see if there is a new channel.

sangaman added a commit that referenced this issue Dec 5, 2019
This commit attempts to ensure that we have a direct channel with peers
for raiden currencies before exchanging orders with that peer for any
pairs involving that currency.

When a peer advertises a trading pair, either via initial handshake or
on a node state update, we check that we have a direct channel for any
raiden currencies before activating advertised pairs. If the trading
pair is not activated, then we do not send or accept orders for that
pair with the peer.

An existing timer with an interval of one minute is used for each peer
to periodically check if inactive currencies and pairs can be activated
by performing the same checks described above, including the direct
channel check for raiden currencies.

Closes #1027.
@kilrau kilrau changed the title Ensure that we have a direct channel for raiden Direct Channel Checks (Updated) Jan 15, 2020
@kilrau
Copy link
Contributor Author

kilrau commented Jan 15, 2020

Some new thoughts: #1347 (comment)

sangaman added a commit that referenced this issue Feb 1, 2020
This commit attempts to ensure that we have a direct channel with peers
for raiden currencies before exchanging orders with that peer for any
pairs involving that currency.

When a peer advertises a trading pair, either via initial handshake or
on a node state update, we check that we have a direct channel for any
raiden currencies before activating advertised pairs. If the trading
pair is not activated, then we do not send or accept orders for that
pair with the peer.

An existing timer with an interval of one minute is used for each peer
to periodically check if inactive currencies and pairs can be activated
by performing the same checks described above, including the direct
channel check for raiden currencies.

Closes #1027.
sangaman added a commit that referenced this issue Feb 11, 2020
This commit attempts to ensure that we have a direct channel with peers
for raiden currencies before exchanging orders with that peer for any
pairs involving that currency.

When a peer advertises a trading pair, either via initial handshake or
on a node state update, we check that we have a direct channel for any
raiden currencies before activating advertised pairs. If the trading
pair is not activated, then we do not send or accept orders for that
pair with the peer.

An existing timer with an interval of one minute is used for each peer
to periodically check if inactive currencies and pairs can be activated
by performing the same checks described above, including the direct
channel check for raiden currencies.

Closes #1027.
sangaman added a commit that referenced this issue Feb 12, 2020
This commit attempts to ensure that we have a direct channel with peers
for raiden currencies before exchanging orders with that peer for any
pairs involving that currency.

When a peer advertises a trading pair, either via initial handshake or
on a node state update, we check that we have a direct channel for any
raiden currencies before activating advertised pairs. If the trading
pair is not activated, then we do not send or accept orders for that
pair with the peer.

An existing timer with an interval of one minute is used for each peer
to periodically check if inactive currencies and pairs can be activated
by performing the same checks described above, including the direct
channel check for raiden currencies.

Closes #1027.
sangaman added a commit that referenced this issue Feb 14, 2020
This commit attempts to ensure that we have a direct channel with peers
for raiden currencies before exchanging orders with that peer for any
pairs involving that currency.

When a peer advertises a trading pair, either via initial handshake or
on a node state update, we check that we have a direct channel for any
raiden currencies before activating advertised pairs. If the trading
pair is not activated, then we do not send or accept orders for that
pair with the peer.

An existing timer with an interval of one minute is used for each peer
to periodically check if inactive currencies and pairs can be activated
by performing the same checks described above, including the direct
channel check for raiden currencies.

Closes #1027.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 top priority swaps
Projects
None yet
2 participants