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

Rewrite execTransactions #59

Merged
merged 37 commits into from
May 20, 2020
Merged

Rewrite execTransactions #59

merged 37 commits into from
May 20, 2020

Conversation

cag
Copy link
Contributor

@cag cag commented May 1, 2020

Right now, there are a bunch of issues which while they may seem unrelated are related in a lot of ways. There's a bunch of work necessary to get this thing to always "be able to do batch transactions while simultaneously constructing a contract proxy that will stick with some account forever, and also make errors happen in an informative manner if possible."

It has to work in real scenarios (#55). For the most part, this seems to be true, as even though the test suites are failing, they aren't failing that badly. (#58)

One reason for the failing tests has to do with it currently being impossible to send safeTxGas to the CPKFactory for the first batch of transactions (#45). Doing that would help make estimating gas costs for these transactions more consistent with the already-existing-proxy use case as well, since the current gas estimation work does not do anything for proxies which don't exist yet. This has to do with the safeTxGas causing reverts if there's not enough gas available to execute the transaction, so the JSONRPC eth_estimateGas would actually generally sort of work, and actually passing a gas value to the transaction options would be unnecessary.

Actually getting a value for safeTxGas is tricky, as the value is returned as revert data from a call to requiredTxGas. Different clients handle that differently, and there would probably have to be some way of doing this for the non-existent-proxy use case. This is kinda tricky because requiredTxGas has to be issued from the proxy as well.

Solving that would require changing the CPKFactory code, which would then involve redeploying the factory, and that would probably involve all contract changes planned for the next release. Of course, we probably shouldn't just leave all v1.1.1 behind with new improvements, so the strategy for handling new proxy addresses should be hashed out (#38), though perhaps we could put this off until later.

Contract changes related to being able to send safeTxGas to the CPKFactory include:

These changes imply a major overhaul of the CPKFactory.


Anyway, I can't do everything above at once. My plan is that this PR does the following:

@cag cag marked this pull request as ready for review May 7, 2020 23:16
@germartinez germartinez changed the base branch from support-real-clis to master May 20, 2020 08:43
@germartinez germartinez merged commit 5e9bb0d into master May 20, 2020
@germartinez germartinez deleted the rewrite-exec-txs branch May 20, 2020 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure compatibility with major clients attemptTransaction error has overwritten the original error message
2 participants