Bitcoin Forum
October 31, 2024, 08:39:46 PM *
News: Bitcoin Pumpkin Carving Contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can not edit config file in Electrum, it gets overridden after starting Electrum  (Read 155 times)
curious droid (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 17


View Profile
July 04, 2021, 11:29:29 AM
Merited by ABCbits (1)
 #1

Hi
Im on Linux Mint 20.1 Cinnamon, i want to setup Electrum to run over EPS, now i have to edit config file to add following as it was described here https://curiosityoverflow.xyz/posts/bitcoin-electrum-wallet/#tor-configuration

Code:
{ "auto_connect": false,
"oneserver": true,
"confirmed_only": true,
"server": localhost:50002:s
"skipmerklecheck": true, <-- this is important if your node is pruned
"use_rbf": false }
I also added this in command line of my desktop icon --oneserver --server localhost:50002:s
Now when i edit config file, i save it then close, i start Electrum and all my changes in config file get lost.
How can edit it and save permanently?
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
July 04, 2021, 12:14:05 PM
 #2

Are you by any chance having any Electrum instances open while you're editing and saving the file? Electrum writes to the config when the user closes the client. Ensure that your Electrum is not running while editing the config.

Scrutinize the settings and don't blindly follow whatever they're telling you. For eg. disabling RBF.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6309


Self-proclaimed Genius


View Profile
July 04, 2021, 01:47:52 PM
Merited by curious droid (1)
 #3

You already created a thread in "Beginners and Help" one hour ago (link), there's no need to repost it.
I believe it was moved to this board.

I have a reply to that thread, have you tried it already?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
curious droid (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 17


View Profile
July 04, 2021, 02:24:23 PM
 #4

Are you by any chance having any Electrum instances open while you're editing and saving the file?

No, i edit config file then i run Electrum, before editing i close Electrum.

You already created a thread in "Beginners and Help" one hour ago (link), there's no need to repost it.
I believe it was moved to this board.

I try to delete that post but get this message: "You cannot delete your own topics in this board"

I have a reply to that thread, have you tried it already?

You should just edit your config file's existing values into those list's values.
Example: find "auto_connect" and set the value to "false", do the same to the rest.

If it's not available, your can add it to the next line.
Example: if "oneserver" isn't yet configured, add a line containing "oneserver": true,


Note: Do not forget to add "," if it's not the last line or it will result with the same behavior.
BTW, that happens when there's an error in the config file or if Electrum can't parse it.


I tried adding values as you said, and i do it one by one, only "oneserver": true, stays, other values get lost after i start electrum.
Looks like this values ls important for me as I run prune node. "skipmerklecheck": true,  <-- this is important if your node is pruned
I probably could ignore this value "server": "10.0.0.1:50002:s", <-- replace with your IP since my Electrum desktop icon already have this line --oneserver --server localhost:50002:s which i assume does the same.
I am not sure with other 3 value below, do i need them to run Core+Tor+Electrum+EPS
"auto_connect": false,
"confirmed_only": true,
"use_rbf": false





ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
July 04, 2021, 03:04:30 PM
Last edit: July 04, 2021, 03:26:07 PM by ranochigo
 #5

I tried adding values as you said, and i do it one by one, only "oneserver": true, stays, other values get lost after i start electrum.
No matter how many times I've tried, I can't replicate the issue. Electrum reorganizes the sequence of the config during shutdown, could you check if you missed it due to the shuffling? (Sorry it might be a bit obvious but I suspect that might be the case.)
Looks like this values ls important for me as I run prune node. "skipmerklecheck": true,  <-- this is important if your node is pruned
I probably could ignore this value "server": "10.0.0.1:50002:s", <-- replace with your IP since my Electrum desktop icon already have this line --oneserver --server localhost:50002:s which i assume does the same.
I am not sure with other 3 value below, do i need them to run Core+Tor+Electrum+EPS
"auto_connect": false,
"confirmed_only": true,
"use_rbf": false

skipmerklecheck persists if I enter it at the end like this:

Code:
"skip_merkle_check": true

Take care to not break the syntax of the config. Oneserver should disable autoconnect, if I'm not wrong (doesn't hurt to include). As long as you trust the server, you don't have to include confirmed_only either. The use_rbf depends on whether you want your transactions to have opt-in RBF.

Edit: Okay anyways. Since you're explicitly running Electrum with -oneserver and the server you're connecting to, you don't have to include the two config variables for that. For confirmed_only = true, it would prevent you from spending any unconfirmed UTXO. Again, doesn't hurt to add them; your arguments will override the appropriate configs.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6309


Self-proclaimed Genius


View Profile
July 04, 2021, 03:17:30 PM
Last edit: July 06, 2021, 07:19:29 AM by nc50lc
 #6

I try to delete that post but get this message: "You cannot delete your own topics in this board"

I have a reply to that thread, have you tried it already?
-snip-
I tried adding values as you said, and i do it one by one, only "oneserver": true, stays, other values get lost after i start electrum.
-snip-
Maybe the "lost" one are input incorrectly or just moved to another line?
If the line is valid, it should stay and Electrum will just rearrange them.

Those lines sould be written as (insert to your config file, skip the ones that're already in the config file):
Code:
"auto_connect": false,
"oneserver": true,
"confirmed_only": true,
"server": localhost:50002:s,
"skipmerklecheck": true,
Your "server" doesn't end with "," and may invalidate the rest of the config.
The lines "<-- this is important if your node is pruned" and similar shouldn't be added to the config.

I think those are all essential for your use-case.

Like I've said in the other thread:
Note: Do not forget to add "," if it's not the last line or it will result with the same behavior.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
curious droid (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 17


View Profile
July 04, 2021, 04:17:37 PM
 #7

Thank you all for your help.
I did as you guys said and managed to make values to stay this way

{
    "blockchain_preferred_block": {
        "hash": "0000000000156789g9c085aeg344t31e934ff74567hta2a6c172b3f1b89ghce26f",
        "height": 0
    },
    "check_updates": false,
    "config_version": 3,
    "confirmed_only": true,
    "gui_last_wallet": "/home/mint/.electrum/wallets/default_wallet",
    "is_maximized": false,
    "oneserver": true,
    "recently_open": [
        "/home/mint/.electrum/wallets/default_wallet"
    ],
    "rpcpassword": "yjXdMfDFR546nyP7Uk67ujxw==",
    "rpcuser": "user",
    "show_channels_tab": true,
    "skipmerklecheck": true
}


Red values are added by me, but no matter where i put other 2 values ("auto_connect": false, & "server": localhost:50002:s,) they disappear after launching electrum and erase all other manually added values.
But since i already have --oneserver --server localhost:50002:s in my shortcut i can use Electrum + EPS + Core without those 2 values, can i ?
nc50lc
Legendary
*
Offline Offline

Activity: 2590
Merit: 6309


Self-proclaimed Genius


View Profile
July 05, 2021, 02:32:22 AM
 #8

Thank you all for your help.
I did as you guys said and managed to make values to stay this way
-snip-
Red values are added by me, but no matter where i put other 2 values ("auto_connect": false, & "server": localhost:50002:s,) they disappear after launching electrum and erase all other manually added values.
But since i already have --oneserver --server localhost:50002:s in my shortcut i can use Electrum + EPS + Core without those 2 values, can i ?
Certainly yes. Forcing to connect to a server will disable Electrum's auto server selection.
So you won't be needing "auto_connect": false in that case; --oneserver isn't needed in the shortcut though since it's already in the config.

The disappearance of those two lines from the config file baffles me though, it doesn't happen in my config file.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
curious droid (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 17


View Profile
July 05, 2021, 04:29:13 PM
 #9


Thank you very much @nc50lc and @ranochigo!
Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
July 05, 2021, 07:26:59 PM
 #10

shouldn't the server line include double quotes:

Code:
"server": "localhost:50002:s",

don't turn off rbf. it's very useful.
curious droid (OP)
Jr. Member
*
Offline Offline

Activity: 45
Merit: 17


View Profile
July 05, 2021, 07:41:30 PM
 #11

shouldn't the server line include double quotes:

Code:
"server": "localhost:50002:s",

don't turn off rbf. it's very useful.

i have it exactly like this
Code:
"server": "localhost:50002:s",


Thanks! i ended up not turning off rbf.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!