LoyceV (OP)
Legendary
Offline
Activity: 3794
Merit: 19771
Thick-Skinned Gang Leader and Golden Feather 2021
|
 |
August 13, 2025, 02:37:50 PM Last edit: August 23, 2025, 10:19:19 AM by LoyceV Merited by NeuroticFish (10), pooya87 (10), joker_josue (10), hosemary (8), bitmover (8), dbshck (8), hugeblack (6), Pmalek (4), TryNinja (2), BitMaxz (1), khaled0111 (1), nc50lc (1), DireWolfM14 (1), Charles-Tim (1), mikel_012 (1), stwenhao (1) |
|
I'm currently installing my very first Electrum server, and figured I'd start a topic to keep track of my progress. Medusah's post 4 weeks ago pointed out that an increase number of Bitcoin miners lowered their minimum transaction fee from 1 to 0.1 sat/vbyte. Unfortunately, Electrum doesn't allow the user to set a fee lower than the connected Electrum server's minimum, which makes it much more compliated to use the lower fees. My goal is to create the first Electrum server that allows this. I may or may not be running this long-term, by the time others join the lower fees I may stop it as it takes quite some disk space. Note that some miners still prefer empty blocks over lower fees. Use mempool.space to see how likely your transaction is going to be included. If it takes too long to confirm: just switch to an Electrum server that doesn't accept low-fee transactions, and create a new transaction with higher fee. My current VPS has 32 GB RAM, and enough NVMe storage for everything except for Bitcoin Core's blocks directory. That directory is on much slower network storage. I'll have to see how it performs on this hardware. It turns out there are many different implementation of Electrum server. ABCbits's post made me choose Fulcrum. Progress so far (summarized): - Create user "electrum"
- Start and sync Bitcoin Core:
bitcoind -maxuploadtarget=400000 -dbcache=16384 -rpcuser=user -rpcpassword=pass -rpcport=number -minrelaytxfee=0.000001 --incrementalrelayfee=0.000001 ~/Fulcrum-1.12.0-x86_64-linux/Fulcrum --datadir /path/datadir --bitcoind 127.0.0.1:number --rpcuser=user --rpcpassword=pass PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 11626 electrum 20 0 3557636 797904 6272 S 257.1 2.4 74:04.61 Fulcrum 9573 electrum 20 0 16.7g 2.3g 1.8g S 13.0 7.4 12:07.91 bitcoind [2025-08-13 16:26:45.772] <Controller> Processed height: 269000, 29.6%, 19.8 blocks/sec, 7035.7 txs/sec, 25674.4 addrs/sec [2025-08-13 16:27:27.935] <Controller> Processed height: 270000, 29.7%, 23.7 blocks/sec, 7932.9 txs/sec, 27207.3 addrs/sec [2025-08-13 16:28:44.932] <Controller> Processed height: 271000, 29.8%, 13.0 blocks/sec, 5863.4 txs/sec, 21324.5 addrs/sec [2025-08-13 16:29:53.065] <Controller> Processed height: 272000, 29.9%, 14.7 blocks/sec, 6917.3 txs/sec, 23934.4 addrs/sec [2025-08-13 16:30:39.111] <Controller> Processed height: 273000, 30.0%, 21.7 blocks/sec, 9363.9 txs/sec, 34043.5 addrs/sec [2025-08-13 16:31:14.499] <Controller> Processed height: 274000, 30.1%, 28.3 blocks/sec, 10296.1 txs/sec, 39189.5 addrs/sec [2025-08-13 16:31:50.110] <Controller> Processed height: 275000, 30.2%, 28.1 blocks/sec, 9665.8 txs/sec, 37819.0 addrs/sec - Syncing got slower and slower, so I followed Cricktor's post and added caching:
config.conf
utxo_cache = 8192 - After building it's database, edit Fulcrum's quickconfig.conf with hostname and IP-address for Electrum to connect to.
Use instructions from https://github.com/christroutner/docker-fulcrum to create a SSL certificate - ~/Fulcrum-1.12.0-x86_64-linux/Fulcrum quickconfig.conf
Server is running: electrum.loyce.club:50002 Minimum relay fee reduced to 0.1 sat/vbyte by restarting Bitcoin Core with adjusted options (see above). How to use thisElectrum settingsConnect Electrum to a server that allows lower fees, like electrum.loyce.club:50002 "Teach" your Electrum to sign transactions with less that 1 sat/vbyte: wallet.relayfee = (lambda: 0) Or automate it on startup: Note: this allows to create transactions that pay less than 0.1 sat/vbyte fee, but at the moment no mining pool will accept those. Self-moderated against spam. Discussion is of course allowed.
|
¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
|
|
|
ABCbits
Legendary
Offline
Activity: 3360
Merit: 9112
|
 |
August 14, 2025, 08:47:12 AM |
|
Continuing discussion from other thread. Have you checked whether OS on your server already enable Zram? It's handy feature when you're limited on RAM capacity. My VPS doesn't use it. I would prefer a traditional swap file over compressed RAM. FWIW, Zram is generally better option since time to compress/decompress is much faster than delay when transferring data RAM and your storage drive.
|
|
|
|
|
Pmalek
Legendary
Offline
Activity: 3248
Merit: 8486
|
 |
August 14, 2025, 12:30:27 PM |
|
He won't have to broadcast the transactions using his Electrum server if he doesn't want to. Chances are that some or all of the peers he connects to won't be configured to consider sub 1 sat/vByte transactions as valid anyway. The most important thing is to sign the transaction using an Electrum server that supports it and then you can copy/paste the raw transaction using mempool.space's broadcast transaction window and broadcast it from there. That also ensures that the biggest mining pools add your transaction to their mempools.
|
|
|
|
ghost43
Jr. Member
Offline
Activity: 31
Merit: 122
|
In that case the old method should still work. You can set wallet.relayfee = (lambda: 0) in the Qt console, and then the GUI lets you do whatever you want. Create even zero-fee txs. Without the linked PR, the GUI won't even let you sign the tx. (perhaps that should be changed but that's how it works atm) The server-reported minrelayfee is clamped, just like many other server-reported values, such as the dynamic fees, there are safety limits. It cannot go below 1 sat/vbyte. The PR is changing the value of the lower clamp.
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2898
Merit: 7565
Self-proclaimed Genius
|
Without the linked PR, the GUI won't even let you sign the tx. (perhaps that should be changed but that's how it works atm)
I tried the latest master branch containing that PR but it can't seem to sign the lowest possible 0.1sat/vB transaction at first. But after manually adding 1sat to the absolute fee, it let me sign the transaction. Seem to be a minor issue with fee rate calculation since it's too small. On a side note, since it's merged, we can expect this in the next release. My goal is to create the first Electrum server that allows this.
Too bad ( a good thing actually now that there'll be 2), electrum.labrie.ca beat you to it.
|
|
|
|
Pmalek
Legendary
Offline
Activity: 3248
Merit: 8486
|
 |
August 15, 2025, 07:12:32 AM |
|
In that case the old method should still work. You can set wallet.relayfee = (lambda: 0) in the Qt console, and then the GUI lets you do whatever you want. Create even zero-fee txs. But towards the end of that GitHub thread they say that this method doesn't work anymore. TheButterZone suggested a specific order in which you create the transaction to be able to sign it in this comment. That apparently doesn't work either. I tried the latest master branch containing that PR but it can't seem to sign the lowest possible 0.1sat/vB transaction at first. But after manually adding 1sat to the absolute fee, it let me sign the transaction. Seem to be a minor issue with fee rate calculation since it's too small.
On a side note, since it's merged, we can expect this in the next release.
How exactly did you get the server to accept and sign your transaction? Too bad (a good thing actually now that there'll be 2), electrum.labrie.ca beat you to it.
I will connect to this server later today and see if it accepts sub 1 sat/vByte transactions. Thanks for the tip.
|
|
|
|
flatfly
Legendary
Online
Activity: 1190
Merit: 1019
090930
|
 |
August 15, 2025, 07:26:06 AM |
|
electrum.labrie.ca Confirmed, I was able to make a 0.3 sat/vB tx using this server.
|
|
|
|
LoyceV (OP)
Legendary
Offline
Activity: 3794
Merit: 19771
Thick-Skinned Gang Leader and Golden Feather 2021
|
 |
August 15, 2025, 07:26:47 AM |
|
My goal is to create the first Electrum server that allows this. Too bad ( a good thing actually now that there'll be 2), electrum.labrie.ca beat you to it. If I would have known, I wouldn't have started this  But I'll continue now: Fulcrum is at 94%, speed is down to 1-2 blocks per second. So about 12 hours to go. So far, the database is 152 GB. I was expecting a config setting to change this, but it looks like it's more work than that. I'll probably get to this tomorrow, once it's complete.
|
¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
|
|
|
nc50lc
Legendary
Offline
Activity: 2898
Merit: 7565
Self-proclaimed Genius
|
 |
August 15, 2025, 07:49:47 AM |
|
I tried the latest master branch containing that PR but it can't seem to sign the lowest possible 0.1sat/vB transaction at first. But after manually adding 1sat to the absolute fee, it let me sign the transaction.
How exactly did you get the server to accept and sign your transaction? I used Electrum master branch's latest source code where the mentioned pull request was merged And then launched it via Python ( after setting up the dependencies and requirements). After that, I just connected to the mentioned server that accepts 100sat/vKb transaction fee and it went quite smoothly. BTW, signing part is done via client where the wallet that contains the private key are saved, the server isn't involved in it.
|
|
|
|
Pmalek
Legendary
Offline
Activity: 3248
Merit: 8486
|
 |
August 15, 2025, 03:15:35 PM |
|
electrum.labrie.ca Confirmed, I was able to make a 0.3 sat/vB tx using this server. I don't know how you got it to work because it didn't work for me. After I switched to the server, I saw the usual notification that the server won't broadcast my transaction when I set the transaction fee below 1 sat. I restarted Electrum a few times but that didn't work either. When I closed the send tab a few times and opened it again, it allowed me to enter a few below 1 sat/vByte without that notification popping up and the "preview" button became clickable. But what I noticed was that the equivalent amount in USD was as if I had set the fee to 1 sat/vByte. The wallet didn't lower it regardless if I set it to 0.7, 0.5, 0.3 sats, etc. There was also a notification next to the total fee that said "xxx amount of sats will be added to the transaction." It always added enough to make the fee 1 sat/vByte. Are you sure you didn't see the same and you just think that you broadcasted the transaction at 0.3 sat/vByte when in fact you didn't?
|
|
|
|
ghost43
Jr. Member
Offline
Activity: 31
Merit: 122
|
 |
August 15, 2025, 06:15:12 PM Last edit: August 15, 2025, 06:28:22 PM by ghost43 Merited by Pmalek (2), nc50lc (1), DireWolfM14 (1) |
|
I tried the latest master branch containing that PR but it can't seem to sign the lowest possible 0.1sat/vB transaction at first. But after manually adding 1sat to the absolute fee, it let me sign the transaction. Seem to be a minor issue with fee rate calculation since it's too small. Do you have more details to reproduce the rounding error? What was the vbyte size of the transaction? You set the feerate to 0.1 s/b, and what absolute fee did the GUI calculate? (EDIT: I think I found it. should be fixed by https://github.com/spesmilo/electrum/commit/392400295e733e1dd3f0cb14189466e8a76890ef) In that case the old method should still work. You can set wallet.relayfee = (lambda: 0) in the Qt console, and then the GUI lets you do whatever you want. Create even zero-fee txs. But towards the end of that GitHub thread they say that this method doesn't work anymore. It works. That's why the issue got closed, and I tested it before posting that here in any case. But what I noticed was that the equivalent amount in USD was as if I had set the fee to 1 sat/vByte. The wallet didn't lower it regardless if I set it to 0.7, 0.5, 0.3 sats, etc. There was also a notification next to the total fee that said "xxx amount of sats will be added to the transaction." It always added enough to make the fee 1 sat/vByte.
If you have "output value rounding" enabled, that can increase the fee by up to 100 sats. Also, dust-valued change outputs are not created but converted to fees. electrum.labrie.ca Confirmed, I was able to make a 0.3 sat/vB tx using this server. I don't know how you got it to work because it didn't work for me. After I switched to the server, I saw the usual notification that the server won't broadcast my transaction when I set the transaction fee below 1 sat. What version of the client were you running? Let me repeat it again, it will not work on any released version. You need the linked PR - and - to be connected to a low-fee server. You need both. OR you can just run that one-liner in the console: wallet.relayfee = (lambda: 0) That in itself is sufficient.
|
|
|
|
Pmalek
Legendary
Offline
Activity: 3248
Merit: 8486
|
 |
August 16, 2025, 06:43:16 AM |
|
If you have "output value rounding" enabled, that can increase the fee by up to 100 sats.
I went through all the settings in Electrum but couldn't find anything out of the ordinary. What version of the client were you running? Let me repeat it again, it will not work on any released version. You need the linked PR - and - to be connected to a low-fee server. You need both. OR you can just run that one-liner in the console: wallet.relayfee = (lambda: 0) That in itself is sufficient. My bad. I completely forgot about the bolded part in your post. I thought being connected to a server accepting sub 1 sat/vByte transactions would be enough. I tried it on version 4.6.0 and not the linked PR. I will give it another shot and make sure to enter that command in the console before I do. Thanks!
|
|
|
|
flatfly
Legendary
Online
Activity: 1190
Merit: 1019
090930
|
 |
August 16, 2025, 07:25:51 AM |
|
electrum.labrie.ca Confirmed, I was able to make a 0.3 sat/vB tx using this server. I don't know how you got it to work because it didn't work for me. After I switched to the server, I saw the usual notification that the server won't broadcast my transaction when I set the transaction fee below 1 sat. I restarted Electrum a few times but that didn't work either. When I closed the send tab a few times and opened it again, it allowed me to enter a few below 1 sat/vByte without that notification popping up and the "preview" button became clickable. But what I noticed was that the equivalent amount in USD was as if I had set the fee to 1 sat/vByte. The wallet didn't lower it regardless if I set it to 0.7, 0.5, 0.3 sats, etc. There was also a notification next to the total fee that said "xxx amount of sats will be added to the transaction." It always added enough to make the fee 1 sat/vByte. Are you sure you didn't see the same and you just think that you broadcasted the transaction at 0.3 sat/vByte when in fact you didn't? I tried another 0.4 sat/vB tx to be sure, and it just worked. I'm not using a custom build of electrum or any unusual settings. https://mempool.space/tx/254bb8d64d33efc89873e56a45b456b37f102fb34215b628b2064ba57f11d931No idea if I'm just lucky or something.  This is the server I'm currently connected to: electrum.pabu.io:50002
|
|
|
|
LoyceV (OP)
Legendary
Offline
Activity: 3794
Merit: 19771
Thick-Skinned Gang Leader and Golden Feather 2021
|
 |
August 16, 2025, 07:36:35 AM |
|
In that case the old method should still work. You can set wallet.relayfee = (lambda: 0) in the Qt console, and then the GUI lets you do whatever you want. Create even zero-fee txs. This works. And it makes my entire project pointless.... All I wanted was an easy way to use Electrum to create a low-fee transaction, and my assumption was this is restricted by the server. But the code above indeed allows to create the transaction I want. Question: what does the "lambda" part do?
Fulcrum is synced. 165 GB database.
|
¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
|
|
|
Pmalek
Legendary
Offline
Activity: 3248
Merit: 8486
|
 |
August 16, 2025, 12:10:03 PM |
|
OR you can just run that one-liner in the console: wallet.relayfee = (lambda: 0) That in itself is sufficient. Just to confirm that this worked for me. I managed to sign and broadcast a sub 1 sat/vByte transaction that was then confirmed a few hours later. Too bad that Electrum doesn't allow to enter fees with two decimal places. Sometimes the difference between 0.30 and 0.31 and 0.32 can mean a lot in terms of a quicker confirmation. Another thing. I was under the impression that Electrum showed you the raw transaction like Sparrow Wallet that you could then copy and paste elsewhere if you didn't want to broadcast it via the server you are connected to. But I didn't see that. Is there a way to get it using Electrum and before broadcasting a transaction?
|
|
|
|
LoyceV (OP)
Legendary
Offline
Activity: 3794
Merit: 19771
Thick-Skinned Gang Leader and Golden Feather 2021
|
Too bad that Electrum doesn't allow to enter fees with two decimal places. You can set the exact fee in sats. So start with 0.3 sat/vbyte, then add 1 sat in the field on the right. raw transaction Preview > Share > Copy to clipboard.
|
¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
|
|
|
ghost43
Jr. Member
Offline
Activity: 31
Merit: 122
|
In that case the old method should still work. You can set wallet.relayfee = (lambda: 0) in the Qt console, and then the GUI lets you do whatever you want. Create even zero-fee txs. Question: what does the "lambda" part do? It is monkey-patching / overwriting the `Abstract_Wallet.relayfee` instance method of the wallet object. https://github.com/spesmilo/electrum/blob/392400295e733e1dd3f0cb14189466e8a76890ef/electrum/wallet.py#L1782-L1783A lambda is an unnamed function. `lambda: 0` is a function that takes no parameters and returns the integer 0. `Abstract_Wallet.relayfee` is a function that takes a single parameter, `self`, the wallet object itself, and returns an integer, the minrelayfee in sat/kvbyte units. When you run the command in the Console, `wallet` is evaluated as the currently open wallet, an instance of the `Abstract_Wallet` class. And we are trying to replace the `relayfee` instance method with something that "looks the same" (has the same API) as the original. It gets a bit involved but basically the `self` parameter we can just ignore in this case. Perhaps it would be easier to understand if instead of wallet.relayfee = (lambda: 0) I said to use wallet.relayfee = (lambda self=wallet: 0) Both work equally well, I just preferred to be brief. Also less error-prone when typing manually. but with the second code snippet, you can clearly see that we are replacing a function that takes a single argument, a wallet, and returns an integer, with another function having the same characteristics. So the point is that you cannot simply set `wallet.relayfee = 0`, that won't work, as `wallet.relayfee` is not supposed to be an integer but rather a function that returns an integer.
|
|
|
|
Pmalek
Legendary
Offline
Activity: 3248
Merit: 8486
|
 |
August 17, 2025, 06:30:09 AM |
|
You can set the exact fee in sats. So start with 0.3 sat/vbyte, then add 1 sat in the field on the right.
This worked partially. I did as you said but it didn't increase the sat/vByte to the number I expected it would although I added not one but six sats to the total count. I can always bump the transaction if it takes too long. raw transaction Preview > Share > Copy to clipboard. Excellent. This was exactly what I was looking for. Electrum could have named this feature somewhat differently. "Copy to clipboard" isn't very precise. Copy what? "Copy raw transaction to clipboard" would perhaps be better. Just so everyone knows. They will have to copy and paste the command "wallet.relayfee = (lambda: 0)" into the console every time they run Electrum and connect to a server to make below 1 sat/vByte transactions. That's how it is at least for now.
|
|
|
|
TryNinja
Legendary
Offline
Activity: 3318
Merit: 8626
♻️ Automatic Exchange
|
Just so everyone knows. They will have to copy and paste the command "wallet.relayfee = (lambda: 0)" into the console every time they run Electrum and connect to a server to make below 1 sat/vByte transactions. That's how it is at least for now.
I just wrote the smallest Electrum plugin ever that just runs this command at start. https://files.ninjastic.space/relayfeezero-0.0.1.zipTools -> Plugins -> Add -> Select the zip and install. How to verify I'm not stealing your coins: Just open the ZIP and read the qt.py file. It is a 7 lines very small code which anyone can read and understand. 
|
░░░░▄▄████████████▄ ░▄████████████████▀ ▄████████████████▀▄█▄ ▄███████▀▀░░▄███▀▄████▄ ▄██████▀░░░▄███▀░▀██████▄ ██████▀░░▄████▄░░░▀██████ ██████░░▀▀▀▀░▄▄▄▄░░██████ ██████▄░░░▀████▀░░▄██████ ▀██████▄░▄███▀░░░▄██████▀ ▀████▀▄████░░▄▄███████▀ ▀█▀▄████████████████▀ ▄████████████████▀░ ▀████████████▀▀░░░░ | | CCECASH | | | | ANN THREAD TUTORIAL |
|
|
|
|