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

Electrum fails with high-volume addresses, making my funds unspendable #6681

Closed
CodeForcer opened this issue Oct 23, 2020 · 5 comments
Closed
Labels
topic-network 🕸 related to logic in network.py (etc)

Comments

@CodeForcer
Copy link

I have a number of addresses with a large transaction history, for example 12o8XbGRjszE8YhLkMtV8Mb5aVA2MJDn9s

Electrum refuses to load keys for my addresses into the wallet, failing with a history too large message.

Some of my addresses have significant stuck funds, which I seem unable to retrieve using my Electrum wallet.

What can I do to resolve this and recover my funds? Electrum is the only wallet I trust, I don't want to look for another wallet if possible.

@CodeForcer CodeForcer changed the title Electrum fails with high volume addresses, making my funds unspendable Electrum fails with high-volume addresses, making my funds unspendable Oct 23, 2020
@SomberNight
Copy link
Member

SomberNight commented Oct 24, 2020

see #4315

In particular, see #4315 (comment)

In case you don't run your own server, try fortress.qtornado.com:443:s, it has a somewhat higher limit than default.

However, this is just a temporary workaround so that your existing coins are not stuck: I suggest you start giving out a new address from now on for new incoming txns. The current protocol is very inefficient for heavily reused addresses, so there is a max tx limit per address that is enforced as a DDOS-protection for servers. The default limit is around 10k txns for a given address btw.

@SomberNight SomberNight added the topic-network 🕸 related to logic in network.py (etc) label Oct 24, 2020
@CodeForcer
Copy link
Author

Thank you, I edited the MAX_SEND on my ElectrumX and then network_max_incoming_msg_size and it worked.

@SomberNight
Copy link
Member

May I ask why you reuse addresses so many times? Is this a static donation address on a webpage?

@CodeForcer
Copy link
Author

It's a hot address for processing payments, which receives funds from a cold wallet. Our cold computer only allows administration staff to sign a transaction within certain sizes and times to specified hot wallet addresses, and not anywhere else.

Also, I wanted to keep the setup as simple as possible, ie defending a singular private key, with a seperate server monitoring the address for anything suspicious.

However, we're actually in the process of deprecating our hot wallets altogether and moving all customers to non-custodial browser generated wallets with unique mnemonics.

The Electrum codebase has been really inspirational in demonstrating how to crawl XPUBs and then synchronise addresses by subscribing the script hashes with ElectrumX.

If you're interested, I actually wrote a walkthrough of our Bitcoin trading process demonstrated entirely with Electrum in Python:
https://github.com/LocalCoinSwap/bitcoin-trading-scripts

@SomberNight
Copy link
Member

It's a hot address for processing payments, which receives funds from a cold wallet. Our cold computer only allows administration staff to sign a transaction within certain sizes and times to specified hot wallet addresses, and not anywhere else.

I see.

If you're interested, I actually wrote a walkthrough of our Bitcoin trading process demonstrated entirely with Electrum in Python

Very cool! Thanks for showing it.

Some of the stuff you are doing in that example is a bit low level; I think there are easier ways of doing it :)
For example, for creating the witness, you could just do
construct_witness([Signature, PubKey, JohnSecret, TradeInstruction, Script])
Also, I've just added an analogous method, construct_script in #6685.

See an example for constructing a tx that spends an OP_CLTV input in the unit tests:

def test_spending_op_cltv_p2wsh(self):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-network 🕸 related to logic in network.py (etc)
Projects
None yet
Development

No branches or pull requests

2 participants