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

Enable Zeth tx caching and GWEI target in Wallet CLI #406

Open
AntoineRondelet opened this issue Oct 5, 2021 · 1 comment
Open

Enable Zeth tx caching and GWEI target in Wallet CLI #406

AntoineRondelet opened this issue Oct 5, 2021 · 1 comment
Labels
enhancement New feature or request usability Task related to the UX of the project wallet Task related to the wallet implementation

Comments

@AntoineRondelet
Copy link
Contributor

AntoineRondelet commented Oct 5, 2021

It can be helpful for users to generate a Zeth transaction payload, cache it locally (can be persisted on file for ease at first), and fire the actual transaction later. In fact, this would allow to target specific gas price to fire the transaction on the network.
As we know that the number of txs in the tx pool varies (demand for block space varies), the cost of transacting on the target system isn't always the same. Gas price fluctuates (even after EIP1559 on Eth. mainnet) and thus it may be helpful for users to generate the zeth tx payload (the commitments, zkp etc), cache it locally, and fire the tx when gas price drops. This can also be automated by adding some logic in the wallet, e.g. zeth mix --out <your-options> --gwei 120.
Th tx payload can now be generated (without fireing the tx by using the --dry-run flag). We then need to persist this into a file (or cache it) and fire it again on the network either on user input (in which case we need to add a list of ready to be submitted transaction to the wallet state) or automatically when the gas price follows below a target threshold (i.e. see the --gwei flag above). This can be helpful for users who want to pay a target gas price while willing to minimize the time their transactions spend in the transaction pool, all without needing to monitor transaction pools and services like: https://www.gasnow.org/ (soon to be deprecated) or https://ethgasstation.info/.

@AntoineRondelet AntoineRondelet added enhancement New feature or request usability Task related to the UX of the project wallet Task related to the wallet implementation labels Oct 5, 2021
@dtebbs
Copy link
Contributor

dtebbs commented Oct 7, 2021

Th tx payload can now be generated (without fireing the tx by using the --dry-run flag). We then need to persist this into a file (or cache it).

I think this part is already available via the --dump-parameters flag (which is how we generate zeth transactions to later be passed to zecale). The deserialization of that data (the parameters to be passed to the contract) is also implemented, just not exposed via the CLI AFAICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability Task related to the UX of the project wallet Task related to the wallet implementation
Projects
None yet
Development

No branches or pull requests

2 participants