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

TrustedCoin server fails to sign transaction for 2fa_segwit wallet: "Internal Server Error" (electrum 4.3.3) #8128

Closed
Lokoshepherd opened this issue Jan 5, 2023 · 11 comments
Labels

Comments

@Lokoshepherd
Copy link

Hi i have latest version Electrum but when i gonna use it send btc i get a messenge TrustedcoinExpection(Internal server error)
What this mean a update or gonna fix server error soon?

@ecdsa
Copy link
Member

ecdsa commented Jan 5, 2023

what happens if you click on the TrustedCoin icon in the status bar?
the server works for me.

@Lokoshepherd
Copy link
Author

Lokoshepherd commented Jan 5, 2023 via email

@Lokoshepherd
Copy link
Author

Lokoshepherd commented Jan 5, 2023 via email

@Lokoshepherd
Copy link
Author

I have try on my phone to dont work get same error messenge server error

@Lokoshepherd
Copy link
Author

It was 2fa dont work on my laptop when i disable 2fa all works with electrum

@Lokoshepherd
Copy link
Author

Its not safe now?

@badmofo
Copy link
Contributor

badmofo commented Jan 6, 2023

I'm pretty sure this caused by my service (Trustedcoin) puking on some of the 4.3.3 PSBT changes. I'm in the process of trying to diagnose / remedy and hope to have a fix within 24 hrs. In the meantime 2FA folks can either wait for a fix, downgrade or restore-from-seed to disable 2FA.

@SomberNight
Copy link
Member

@badmofo Ah, sorry for that. :/

I can reproduce the server error when trying to sign a tx with a 2fa_segwit seeded wallet.
Signing works with a legacy 2fa wallet (pre-segwit).

Looks like the cause is d3227d7 (re #8039).
That is, if I revert that, the server can sign.

Like the commit message says, previously for segwit inputs in a PSBT we were only putting PSBT_IN_NON_WITNESS_UTXO, but now both PSBT_IN_NON_WITNESS_UTXO and PSBT_IN_WITNESS_UTXO get included. The latter field can be derived from the former (and the rest of the PSBT):

if self.witness_utxo:
if self.utxo.outputs()[self.prevout.out_idx] != self.witness_utxo:
raise PSBTInputConsistencyFailure(f"PSBT input validation: "
f"If both non-witness UTXO and witness UTXO are provided, they must be consistent")

I am fairly certain you could safely discard the latter field (and require the presence of PSBT_IN_NON_WITNESS_UTXO - both old and new versions provide that).

@SomberNight SomberNight changed the title Server Electrum TrustedCoin server fails to sign transaction for 2fa_segwit wallet: "Internal Server Error" (electrum 4.3.3) Jan 6, 2023
@SomberNight SomberNight added bug 🐞 topic-transactions 📑 related to logic in transaction.py labels Jan 6, 2023
@Sadbee69
Copy link

Sadbee69 commented Jan 7, 2023

Guys pls help. give an information when will the problem with Internal Server Error and trustedcoin be solved. I have no money more and i want to eat but all my money stays on not working btc wallet with this error. I just want to live please help to decide this problem

@badmofo
Copy link
Contributor

badmofo commented Jan 8, 2023

Fix applied to the Trustedcoin server. This bug can be closed.

@Lokoshepherd
Copy link
Author

Thanks for fix it with one are more save 2fa Google or master key 2fa?

badmofo added a commit to badmofo/electrum that referenced this issue Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants