Metamask-extension: Add nonce reset item to menu

Created on 25 Jun 2017  Â·  14Comments  Â·  Source: MetaMask/metamask-extension

Because switching the provider & back again is silly.
Maybe "Retry transactions with fresh nonces"?

P3-soon T01-enhancement

Most helpful comment

Part of the problem with any canceling UI is that there is actually no such thing as canceling, and so the more confidence we give a user that they've cancelled one or more transactions, the more alarm and dismay they'll experience if any of those are then mined.

I like the UI flow you describe, I'm just concerned that it could create more user confusion, without actually providing the feature it appears to.

All 14 comments

To make more compatible with #1668, this should mark all currently pending txs as cancelled, and they should no longer retry.

From a UI perspective, what would be "neat" and I think user friendly was if each un-mined transaction in the transactions list had a cancel button next to it. When you hover over the cancel button it would show something like a red X or red line across that transaction and all transactions with a higher nonce, as an indicator to the user that they will be canceling this transaction and all of the ones above it. Clicking the cancel button would just create a transaction with the lowest gas possible (I think a 21000 gas 0 eth send is cheapest?) with a gasPrice 1 higher than the cancelled transaction. The UI at this point would then provide some indicator that there is now a race between the cancellation and the original transactions, and once one of the two were mined it would update to display what actually happened.

To really go above and beyond, perhaps there would be value in submitting a cancellation transaction for each of the transactions above the target, to increase the liklihood of a subset of the transactions being canceled?

I often see users asking (especially during network congestion) "How do I cancel my pending transaction?" and unfortunately the answer for all tools right now is really sub-par.

Part of the problem with any canceling UI is that there is actually no such thing as canceling, and so the more confidence we give a user that they've cancelled one or more transactions, the more alarm and dismay they'll experience if any of those are then mined.

I like the UI flow you describe, I'm just concerned that it could create more user confusion, without actually providing the feature it appears to.

Yeah, I definitely appreciate the desire to not give users false hope. The best I can think of is clear messaging like instead of a red X or strikethrough, the words "Attempting Cancellation" is written in red over each of the transactions with a tooltip that gives additional info on how cancellation is a best-effort thing.

Any updates on Nonce reset? Was discussed quite a bit in #1127, but I fail to see where I can control transaction information. I am asking because I have a stuck transaction (I tried a really low gas price) and now I can't send anything :(. Would like to overwrite the faulty transaction with the same nonce, but no dice. Resetting the network doesn't work.

The nonce reset concept was somewhat replaced by adding much better nonce calculation. My current favorite solution to "stuck transactions" is #2278. Also could be addressed with #1410.

2278 is only a partial solution IMO. It also needs a cancel button that creates a new transaction with same nonce that is a 0-value send (lowest possible gas). There is significant value in being able to cancel a transaction that turns out is far too expensive with a gas price that will actually get mined (which is often _why_ you went with a super low gas price is the first place).

+1 with Micah. We should be able to choose to reset the nonce (or cancel transaction), not just
rely on automation. Sometimes I will want to reset the nonce and sometimes
not.

On Wed, Nov 29, 2017 at 3:23 PM, Micah Zoltu notifications@github.com
wrote:

2278 https://github.com/MetaMask/metamask-extension/issues/2278 is

only a partial solution IMO. It also needs a cancel button that creates a
new transaction with same nonce that is a 0-value send (lowest possible
gas). There is significant value in being able to cancel a transaction that
turns out is far too expensive with a gas price that will actually get
mined (which is often why you went with a super low gas price is the
first place).

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MetaMask/metamask-extension/issues/1668#issuecomment-347984835,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI4BNv7cz69WcxtraCscp-Gg3KLeHMvwks5s7b1KgaJpZM4OEgjX
.

I've added @MicahZoltu's cancel button implementation idea to #1236.

The reason a "reset nonce" button doesn't make sense with our current architecture, is because we derive the nonce from currently pending, and locally known transactions. That's because MetaMask is often pointed at load balanced nodes that may not be aware of a transaction that has been processed, that MetaMask is, and we need to account for processed and pending transactions when suggesting a nonce.

Please ask yourself what this reset button would even do. Would we just tell it to ignore the most recent pending transaction? Successful transaction? It's a slippery slope of unnecessary complexity. This issue made sense when our nonce calculation was a simple cached number that sometimes wasn't incremented correctly. Because we're now accounting for actual known state, any solution to resubmitting or cancelling has to be more conscious of the transactions in queue.

Closing for now, because the proposal doesn't make sense with our current architecture. I'll reopen if someone can come up with a sensible behavior for this feature.

Not even an advance setting (like data) where we can specify the nonce ourselves?

That’s what #1410 would do. It’s a different proposal that makes more sense.

This doesn't work properly. It clears the past transactions or me, but still sets the next tx at nonce 141 each time. Even though nonce should be 0

The nonce can't be set to 0 if you already made transaction with your account. It needs to be set to the nonce of your most recent transaction accepted on the blockchain + 1.

@elie222 could you submit some state logs for the problem you're describing? You can send them to [email protected]

https://metamask.helpscoutdocs.com/article/9-how-to-download-state-logs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whyrusleeping picture whyrusleeping  Â·  3Comments

glitch003 picture glitch003  Â·  3Comments

danfinlay picture danfinlay  Â·  3Comments

MarkOSullivan94 picture MarkOSullivan94  Â·  3Comments

bdresser picture bdresser  Â·  3Comments