-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Attempt to evaluate a gas price before relaying a call #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that if there are to many such relayed calls (compared to normal non-relayed calls) which suggest average1.3 the average will raise...
Need to fix the RelayClient so that it will try to use by default the suggested minGas offered by the relay, up to (say) current1.2.
I agree on this. There is an issue caused by 0 Txs avg in gas calculation. |
@alex-forshtat-tbk @shahafn the latest commit looks to be a misunderstanding in the code. It is also important to keep the fund creator here because after the link expires, they'll be the only ones able to claim the link. |
get_sender() helper function returns msg.sender when the transaction is
called directly. When called through a relay, it returns the real sender
(as the transaction sender is the relay)
…On Wed, Feb 27, 2019, 19:56 Ricardo Rius ***@***.***> wrote:
@alex-forshtat-tbk <https://github.com/alex-forshtat-tbk> @shahafn
<https://github.com/shahafn> the latest commit looks to be a
misunderstanding in the code.
msg.sender is used to log the fund creator not the claimer which should
not be the relay.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AmeOD9WFPxLwFZRDHg2jjNyjZK-jGbhhks5vRsbqgaJpZM4bUdas>
.
|
@drortirosh Great! Thanks for clarifying. So it is good to have it. Very useful for sending tokens. |
@riusricardo Another issue that should be noted: RelayRecipient.sol should be on top of the inheritance hierarchy, since if Links.sol calls Vault.sol's functions that might use msg.sender in a relayed call, they should be replaced with get_sender() as well. |
@shahafn that sounds good to me. I kept Vault as the the most base-like because is the one that handles the value. But if you need to change the order, feel free to do it. |
Now vault can be used via relayed calls
I believe this is a safer way to estimate gas price, even though the "web3.eth.getGasPrice" is not reliable in xdai network, the relays will rely on it anyways.
P.S. I did not test this change thoroughly, still having issues just running Burner Wallet.