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

Explore improvements for EVM TX hash calculation #2128

Open
jribbink opened this issue Feb 11, 2025 · 0 comments
Open

Explore improvements for EVM TX hash calculation #2128

jribbink opened this issue Feb 11, 2025 · 0 comments

Comments

@jribbink
Copy link
Contributor

jribbink commented Feb 11, 2025

Problem

Currently, we calculate the hash in eth_sendTransaction with the assumption that our expected nonce will match that during the time of transaction execution. However, there exist race conditions where this assumption is invalid.

The outcome is that users end up in a UI error state without knowing that the transaction has actually succeeeded.

Suggested Solution

I believe a good short term path to prevent UX friction during eth_sendTransaction calls may be simply to revert during nonce mismatches on-chain. E.g. the client can send its predicted nonce in the Cadence wrapper transcation and this TX can panic.

This provides more predictable guarantees regarding the error state and helps assure users that their funds are safe. It does seem however that COAs could benefit from more resilient nonce-management mechanisms like their EOA counterparts (e.g. see TX pooling mechanisms that exist for EOAs on the EVM GW onflow/flow-evm-gateway#699).

Existing COA wallets (Flow Wallet) currently do not perform such pooling & nonce-management guarantees are will as such be more prone to error conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant