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

Relay should never throw #94

Closed
drortirosh opened this issue Apr 14, 2019 · 0 comments
Closed

Relay should never throw #94

drortirosh opened this issue Apr 14, 2019 · 0 comments
Assignees
Labels
contracts Solidity RelayHub contracts
Milestone

Comments

@drortirosh
Copy link
Member

CURRENT BEHAVIOUR:
If can_relay() fails (return non-zero), the relay() method throws, causing the relay to pay for the transaction.
(NOTE: can_relay() is called directly by the relay before submitting the transaction, so the only case where the relay will attempt to create the transaction is if can_relay() succeeded when called off-chain)
In order to let the relays easily find such historical cases (where contract caused any relay to pay for unprocessed transaction) this should be fixed:

SUGGESTED BEHAVIOUR
The relay() function should be "nothrow": in case can_relay() fails, it should emit TransactionFailed( sender,target,relay, can_relay_result ) event, and exit.
Note that even if can_relay reverts, this event should be created.

With this fix, Issue #76 becomes must simpler to implement

@drortirosh drortirosh added contracts Solidity RelayHub contracts MVP labels Apr 14, 2019
@drortirosh drortirosh added this to the MVP milestone Apr 14, 2019
@drortirosh drortirosh removed the MVP label Apr 14, 2019
@shahafn shahafn closed this as completed May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts Solidity RelayHub contracts
Projects
None yet
Development

No branches or pull requests

2 participants