Electrum: mempool min fee not met

Created on 19 Dec 2017  ·  17Comments  ·  Source: spesmilo/electrum

In Electrum 3.0.3, I created a one-input (standard address), one-output (standard address). It tells me the transaction size is 189 bytes. The lowest fee setting is 5 satoshis/byte, and I created a transaction with this fee setting. The preview window confirms 189 bytes and total fee of 945 satoshis.

However, I am getting an error upon broadcasting that the network rules have rejected the transaction because minimum fee was not met. This worked fine for me in Electrum 3.0.2.

Has the minimum mempool fee changed in the past couple of weeks to be higher than the 5 satoshis/byte allowed by Electrum? If so, then Electrum should change the parameters for the slider so that 5 satoshis/byte is no longer the lowest setting. If not, then it would seem that there is some sort of bug in the byte calculation, or in the fee calculation.

question ❓ topic-fees

All 17 comments

Please try with a different server. That setting is a parameter that bitcoin nodes can freely configure.

More specifically, I believe that the mempool of the specific server (its bitcoind) you are connected to is full, and it will only accept your tx if you pay more than the lowest fee tx in its mempool. The size of the mempool is also a setting that bitcoin nodes can configure.

When I clicked to uncheck the checkbox that said "Select server automatically", Electrum crashed, but when I restarted it picked a different server, and the 5 satoshi/byte fee went through. Thanks.

When I clicked to uncheck the checkbox that said "Select server automatically", Electrum crashed

If you can reproduce that crash, please open a (separate) issue for it. :P

Follow-up question. After successfully broadcasting some 5 satsoshi/byte transactions, they were shown as pending and unconfirmed in Electrum (as I expected -- I just want the transactions to stick around in the mempool until the next low traffic time). But after restarting Electrum, the pending transactions were missing. Presumably I was now connecting to a new server whose min fee was higher than 5 satoshis/byte, and so it never saw my transaction. I've reconnected several times now to randomly chosen different servers (I can't select a server manually due to the above-mentioned bug), and still am not seeing the pending transactions on any of these servers.

Should I assume that the transactions failed to percolate to other servers because too many have a higher minimum fee, or should I wait and trust that it got to enough servers to eventually get sent?

Is there any way to find out what the consensus is on minimum fee? It's frustrating to be able to so easily construct a transaction that (apparently) is failing to propagate beyond the initial server.

Relatedly, is it a bad sign if the unconfirmed transactions aren't showing up on any of the usual blockchain explorers, or is that normal? I'm having a hard time figuring out what the behavior should be when it appears that only some fraction of the Electrum servers know about the transactions.

Is it possible for this error message to be changed to tell the user what the minimum mempool fee is? Also, when you broadcast a message are you "broad"casting to just one electrum server, or are you sending to all 10 (or whatever) electrum servers you're connected to? Its not clear to me (the user just seeing this message) if I'm being rejected by just one electrum server or all of them or what.

Is it possible for this error message to be changed to tell the user what the minimum mempool fee is?

I think this message is output by bitcoind, and then passed on to the electrum server, then passed on to the client. In which case, not really.

are you "broad"casting to just one electrum server, or are you sending to all 10 (or whatever) electrum servers you're connected to?

You only broadcast to the main server you're connected to. The other servers are only used to receive block headers from.

Gotcha thanks!

In which case, not really.

https://github.com/bitcoin/bitcoin/issues/11955

@SomberNight

Sounds like an Electrum server could call bitcoin-cli getmempoolinfo to show the current mempoolminfee. See this comment: https://github.com/bitcoin/bitcoin/issues/11955#issuecomment-353489480

So is there a way for me to find out the mempoolminfee that most servers are using?

Right now, I can find usually one or two out of the 10 servers that will accept the 5 satoshi/byte fee, but the transaction doesn't seem to reach the other electrum servers, and I'm not seeing the pending transaction on any major block explorer.

So I'm thinking about going directly to a block explorer and broadcasting the transactions from there: https://blockchain.info/pushtx

But these also appear to have a minimum fee higher than what Electrum allowed me to create. There's got to be a better way to find out the minimum fee other than trial and error.

And is the minimum mempool fee a hard-coded number, or does it change dynamically based on how crowded the mempool is?

And is the minimum mempool fee a hard-coded number, or does it change dynamically based on how crowded the mempool is?

It changes dynamically.

The Bitcoin network is a decentralised network. Think of it as a simple graph, where vertices are full nodes, and edges are direct connections between full nodes.
There is no global mempool, there is no need to agree on what the mempool contains. Each node has its own mempool. The default size of the mempool is 300 MB atm, but this is a setting that can be configured.

When a txn is broadcasted by a node to its peers (along outgoing edges), the other nodes that receive it will first validate the txn, and then try to fit it in their mempool. If their mempool is full, they will still put in the txn if it pays more than the lowest paying txn currently in there (and then evict the lowest paying tx); if it pays less, they won't put it in their mempool. They will then only broadcast the txn to their peers if the txn was placed in their own mempool.

The bitcoind for my electrum server, for example, currently uses a setting of 1000 MB for mempool size. Hence, if you connect to it, you might be able to broadcast a lower fee tx. But if for instance all the bitcoind peers of this server use a 300 MB default setting, then no one else will know about this txn, it will "stop propagating".

To have a chance of a txn being mined by a miner, you need a path in this graph between the electrum server you connect to and a full node of a miner.

And is the minimum mempool fee a hard-coded number, or does it change dynamically based on how crowded the mempool is?

Dynamic.

  1. The floor is 1 satoshi/byte. Hard coded.
  2. Once your mempool reaches your defined size limit (default: 300MB) it starts ejecting transactions from order of ascending satoshi/byte (accounting for CPFP)
  3. When it ejects the lowest transaction, it bumps up the minimum sat/byte for relay to the sat/byte value of the rejected tx.
  4. The minrelaytxfee has a halflife of 12 hours, but if the mempool usage is less than 1/2 the defined size limit, the halflife for that period is set to 6 hours. if less than 1/4 then 3 hours.

So let's say my node got clogged up and ejected transactions all the way up to 100 satoshis/byte, then suddenly mempool came down to 70 MB (less than 1/4)... I would get to 50 satoshis/byte in 3 hours, 25 in 6, 12 in 9, 6 in 12, 3 in 15, 1 in 18 hours... so 6 halvings, which if it stayed above 150, it would be 3 days (12 hours x 6)

I think it lowers the rate little by little every couple seconds, and of course is raised little by little every time a tx needs to be ejected.

then no one else will know about this txn, it will "stop propagating".

If this happens, if a node previously rejected a transaction because it didn't fit into its mempool, will that node re-request transactions once its mempool clears some space? Or will that transaction simply get stuck and have to be re-broadcast by the source?

@Engelberg

what server did you choose for low transaction? Thank you

@HadiAkmal Electrum shows a list of about 10 servers, and you can manually pick which one to connect to. I just tried each one; usually 1 or 2 out of the 10 would accept the transaction. Didn't help though, because the transaction never got propagated to a miner.

After successfully broadcasting some 5 satsoshi/byte transactions, they were shown as pending and unconfirmed in Electrum (as I expected -- I just want the transactions to stick around in the mempool until the next low traffic time). But after restarting Electrum, the pending transactions were missing

Transactions that drop out from the mempool will turn into "Local" transactions in the client now, and then can be rebroadcast; they won't just disappear (from the client).

Re other issues mentioned here, I believe they have been answered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sancap picture Sancap  ·  5Comments

cculianu picture cculianu  ·  5Comments

dl3br picture dl3br  ·  4Comments

zzAD26KAH59cYpL picture zzAD26KAH59cYpL  ·  5Comments

gtklocker picture gtklocker  ·  4Comments