umbra-protocol icon indicating copy to clipboard operation
umbra-protocol copied to clipboard

Ensure frontend is setup to handle multiple relayers

Open mds1 opened this issue 3 years ago • 2 comments

Do we get a regular tx hash or a tx ID back from OZ relayers used on polygon + L2s? This block of code assumes we get a tx hash on polygon, and an ID everywhere else, but that seems incorrect? (this comment is unrelated to the diff)

Originally posted by @mds1 in https://github.com/ScopeLift/umbra-protocol/pull/319#discussion_r847516511

With ITX (on Mainnet/Rinkeby), their API returns a custom hash and you have to subsequently query their endpoint to figure out the list of actual network transaction hashes. That is what we pass forward from Umbra API.

With Defender, we get back the hash of the first transaction submitted, and that is what we pass forward from Umbra API. Defender also gives you a separate, custom Identifier which can use to query their API, to find out if that first transaction has been replaced or cancelled. We currently don't expose this in any response from Umbra API.

In practice, since we're using this on Polygon and using fast, this virtually never happens, and so the hash we get back ends up being the hash of the transaction that is ultimately mined. This should also be the case on Optimism and Arbitrum.

If we ever started using Defender on mainnet, we might have to revisit this assumption.

Originally posted by @apbendi in https://github.com/ScopeLift/umbra-protocol/pull/319#discussion_r847709753

mds1 avatar Apr 12 '22 14:04 mds1

  • Because all networks are now using OZ defender set to 'fast', it is relatively safe to assume the tx hash returns will be mined and to display this to the user.
  • The relay withdraw window should be updated to include Etherscan link to the tx hash.

garyghayrat avatar Jul 06 '22 19:07 garyghayrat

Since we now use OZ everywhere, I think original scope of this issue is outdated and the issue can be closed. But we don't have support for properly handling replacement txs with OZ—I'm not sure if they have an endpoint we should use to fetch the latest tx hash or some other approach, but either way it probably could be a separate issue. https://github.com/ScopeLift/umbra-protocol/blob/5a969f7e57b8fe5aede7f117f14be7c389480796/frontend/src/components/AccountReceiveTable.vue#L594-L599

The relay withdraw window should be updated to include Etherscan link to the tx hash.

What is this referring to? My guess is that the tx notification window in the top right that shows tx status does not let you click it to view the withdraw tx?

mds1 avatar Jul 07 '22 12:07 mds1

But we don't have support for properly handling replacement txs with OZ—I'm not sure if they have an endpoint we should use to fetch the latest tx hash or some other approach, but either way it probably could be a separate issue.

@apbendi this is probably a question for you, is this something we need to support / track in an issue?

The relay withdraw window should be updated to include Etherscan link to the tx hash.

What is this referring to? My guess is that the tx notification window in the top right that shows tx status does not let you click it to view the withdraw tx?

@garyghayrat bumping this question

mds1 avatar Feb 06 '23 17:02 mds1

The relay withdraw window should be updated to include Etherscan link to the tx hash.

What is this referring to? My guess is that the tx notification window in the top right that shows tx status does not let you click it to view the withdraw tx?

@garyghayrat bumping this question

Seems to have been solved with https://github.com/ScopeLift/umbra-protocol/pull/381

garyghayrat avatar Feb 07 '23 16:02 garyghayrat

Opened a new issue to track. https://github.com/ScopeLift/umbra-protocol/issues/634

garyghayrat avatar Dec 14 '23 20:12 garyghayrat