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

add (editable) nonce to confirm screen #1410

Closed
SCBuergel opened this issue May 10, 2017 · 42 comments
Closed

add (editable) nonce to confirm screen #1410

SCBuergel opened this issue May 10, 2017 · 42 comments
Labels
area-devmode area-UI Relating to the user interface. needs-design Needs design support. type-discussion type-enhancement

Comments

@SCBuergel
Copy link

Currently I can edit the gas limit and gas price on the confirm screen. The nonce is not being displayed. It would be very helpful to at least show the nonce for that transaction but even better would be to make that field editable. That would help in the following situations:

  • long pending transactions that I want to "overwrite" with another one that might e.g. have higher gas price
  • "oh shit I sent a wrong tx"-situations that might be quickly fixable by "overwriting" it with another transaction
  • testing what strategy miners actually use to sort transactions
@danfinlay
Copy link
Contributor

I agree we need some method of letting users manage nonces. We may just need to make them more visible across the entire application, from the displays of individual accounts, to transactions.

I've even been thinking maybe clicking a tx should go to a tx detail view (instead of straight to etherscan), and we could show the nonce there, as well as maybe an "Edit" button that allows "Resubmit".

I'd like us to pass this through a little design time before we show it, since it's one field that can completely prevent a transaction from working, but I agree this is important to address.

@2-am-zzz 2-am-zzz added this to the Core Maintenance milestone May 15, 2017
@PhABC
Copy link

PhABC commented Dec 5, 2017

What is the status on this? The recent spike demand made my 5 GWei transaction completely stuck and I was unaware of the traffic. It's been more than 12h and I would appreciate being able to overwrite the nonce without going through the hoops of importing my privatekey somewhere else.

@danfinlay
Copy link
Contributor

Either this or #2278 is now a very high priority, for the reasons you've described. Hopefully in the next couple weeks.

@rstormsf
Copy link

please!!!

@elie222
Copy link

elie222 commented Jan 3, 2018

For development this is also a headache. I reset ganache and the nonce is now back to 0, but metamask sees the nonce as being 190 in my browser. I don't want to keep switching accounts.

@elie222
Copy link

elie222 commented Jan 3, 2018

Ah, I see that I can set the nonce in web3:
https://github.com/ethereum/wiki/wiki/JavaScript-API#parameters-25

That helps me for development :)

@danfinlay
Copy link
Contributor

For the ganache issues, refer to #2373 and #1999.

@adrianmcli
Copy link

I see that bounty worthy was added by @danfinlay. How would I go about this if I want to see if I can tackle it?

@danfinlay
Copy link
Contributor

Sorry @adrianmcli this one isn't an ideal bounty anymore, because it involves designs that we haven't produced yet, right before we roll out the new UI, so effort on this would be likely to be wasted at the moment.

We should really document our UI/design process flow better as we add more bounties, I realize I keep using "design blocker" as a reason an issue isn't ideal for public contribution yet...

@cjeria cjeria removed this from the Core Maintenance milestone Jan 22, 2018
@danfinlay
Copy link
Contributor

MetaMask uses your currently pending transactions to calculate the correct nonce to give an additional transaction.

When submitting one in place of another pending transaction, the rest of your transactions are still in queue, and so letting users do that has resulted in some dangerous and confusing situations in the past:
https://consensys.zendesk.com/hc/en-us/articles/360004133232-Ghost-Accounts-Ether-Sending-Away-Whenever-Funding-An-Account

To address this problem in a safe way, we are currently implementing the ability to cancel your transactions (MetaMask/Design#25, #4022) in a way that actually keeps users safe from confusing situations like the one above.

One way to work around this is to just ignore the transactions that have been broadcast. You can do this in MetaMask today using the reset account feature, but you can also just send a transaction from any other client to get the same effect. In this scenario, you send a replacement transaction, and hope for the best. We don't make this easy by default right now, because we've seen it can result in users losing funds in other ways.

Sorry this bit you, but rest assured we are actively working on solving the problem you faced in a way that is even safer than switching between clients.

@Mecooo
Copy link

Mecooo commented Aug 28, 2018

but you can also just send a transaction from any other client to get the same effect. In this scenario, you send a replacement transaction, and hope for the best.

You mean like TrustWallet, right? Would an other browser with MetaMask work as well?
For example:
I have these issues in firefox and can just install chrome and insert MetaMask there.. add my private key and launch a txn.. But how without chaning the nonce? Is it because the other client hasn't gotten the new (pending) txn number so far? And why is it possible in Trustwallet. I mean, there you can easily change the nonce.

Thank you for your answer :)

@Mecooo
Copy link

Mecooo commented Aug 29, 2018

Hello again @danfinlay :)
Is it possible to code a external button on my website that will reset MetaMask with its txn list? Probably not, but thought it is worth asking it.

Thank you,
greetings Meco

@danfinlay
Copy link
Contributor

You mean like TrustWallet, right? Would an other browser with MetaMask work as well?

Yes, any other client, including another browser with MetaMask would work in this scenario.

Is it possible to code a external button on my website that will reset MetaMask with its txn list?

No.

I have these issues in firefox and can just install chrome and insert MetaMask there.. add my private key and launch a txn.. But how without chaning the nonce? Is it because the other client hasn't gotten the new (pending) txn number so far? And why is it possible in Trustwallet. I mean, there you can easily change the nonce.

We could very easily let you change the nonce, and we will probably add this under a flag in settings, but by default, we see far more users lose funds and get frustrated by editing their nonces without knowing what they're doing than we get people who want to edit their nonce.

@Mecooo
Copy link

Mecooo commented Aug 29, 2018

Well, that is absolutely true!

Of course there are more people using MetaMask who are not familiar with this option and would probably use it in a wrong way. Provided that it is obvious like changing gas and so on.

What would you say if you -for the time being- add the possibility to edit it only with some external "tools". So the function is limited to these tools and people have to search for it. So there would be no one who would do it by mistake, because there wouldn't be a direct possibility in the MetaMask interface. And on the other hand you would offer the possibility for those who wanna use it. So those users would do it consciously.. most likely with the knowledge which is important for them.

Win-win in my opinion with a very minimum of risk.

@danfinlay
Copy link
Contributor

It's an interesting idea, but why not just add an advanced flag to allow editing it in settings? I think this solves the problem just as well without needing to figure out how to expose this new semi-restricted API to an approved tools list.

Plus, our new safer cancel feature should make it very user-friendly for even novices to achieve what you're going for, without needing to know about nonces.

@Mecooo
Copy link

Mecooo commented Aug 29, 2018

To be honest.. I thought about this idea as well. But without the cancel feature the user would still have to know how it exactly works and how he has to set the nonce and where to find it on etherscan for example. Sometimes people just think they know it 😉 and probably it would make it harder for external devs to work with it, if something would be hidden in the settings which a user would have to enable before he can use the dapp.

On my website is everything the have to know and it is very easy to understand.

Isn’t it easy just to let MetaMask take the dapp provided nonce with
...
nonce: 123,
}
Cause you said atm it just ignores it. So just don't ignore it :)

With the cancel feature you are right. After this release there wouldn’t be a reason or benefit for my idea.

@mehmeta
Copy link

mehmeta commented Nov 11, 2018

Is anyone working on this? Wouldn't this be helpful in the following scenario?

  1. Send an ETH transaction, with low gas, gets stuck (with nonce a)
  2. Realize it takes too long, send a cancellation tx, with a higher gas, also with nonce a.
  3. Cancellation tx also takes too long, even though you increased the gas amount. It seems that the "speed up" button only appears on the latest pending tx. So at this point, if I wanted to simply send the first ETH tx with a higher gas amount (rather than canceling), I'm not able to do that (since speed up button only appears on the latest pending tx, which is the cancel tx here). I have to submit a cancellation tx on the 1st ETH tx successfully before I can submit any more transactions.

@danfinlay I'd be happy to work on this feature, if there's any guidance.

@Mecooo
Copy link

Mecooo commented Nov 12, 2018

Well I was working on my idea and already finished it. There is just no way as long as MetaMask ignores nonce of external dapps

@bdresser
Copy link
Contributor

@mehmeta that's a good point - we should probably persist the "speed up" button on all tx with the lowest nonce. Filed here: #5732

@ExperimentsWithCode
Copy link

ExperimentsWithCode commented Dec 7, 2018

Could really use this feature. Trying to place a bid. My transaction has been stuck for a long time. Tried again with higher gas, also stuck seemingly forever. At this point my bid is useless and i'd rather just submit a new bid over the same nonce but don't have that capability.

This feature would be useful because sure i can keep raising my gas, but in the time relevant situation, I will have to cancel my bid and place a new one which means paying three gas fees instead of one for a gas intensive transaction.

@martinkrung
Copy link

Can you add nonce to edit? This ticket is 2 years old. As it not often used, it would be possible to "hide" it in the settings, like "overwrite nonce for next tx" or so.

@danfinlay
Copy link
Contributor

Can you add nonce to edit? This ticket is 2 years old. As it not often used, it would be possible to "hide" it in the settings, like "overwrite nonce for next tx" or so.

I think adding this as an advanced setting would be the appropriate way to do it. Would be a simple addition, but is probably not going to hit our primary priorities soon, making it a better candidate for a bounty. I would probably want to open a fresh issue specifying that exact feature cleanly, for the sake of easing a bounty hunter's cognitive load. Added as #6757 .

Btw, regarding cancelling transactions above: We have a "cancel" button on pending txs, so nullifying transactions safely is already possible. Try clicking a pending tx to try it!

@martinkrung
Copy link

Thanks for the new ticket, looking forward. I ended up using an old offline version of myetherwallet: I did a offline tx, where you have to set nonce anyway.

@doggodfroglog
Copy link

doggodfroglog commented Jul 3, 2019

@danfinlay Cancel doesn't work. Metamask lost my transaction, says invalid after speeding up. Can still see old one pending on Etherscan. Need to change nonce manually now and cancel.

@doggodfroglog
Copy link

@danfinlay Honestly not even sure how to do it lol. I'm gonna have to import my private keys to offline MEW now because metamask is missing this feature?

@doggodfroglog
Copy link

chrome_ouoEuHoOJa

@danfinlay
Copy link
Contributor

danfinlay commented Jul 3, 2019

@doggodfroglog to help us diagnose that issue, you can download your "state logs" by following this guide, and then sending them to support@metamask.io .

@fabtho
Copy link

fabtho commented Sep 11, 2019

This should fix this, hopefully merged soon: #7089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devmode area-UI Relating to the user interface. needs-design Needs design support. type-discussion type-enhancement
Projects
None yet
Development

No branches or pull requests