Bitcoin Forum
May 07, 2024, 04:43:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: running both bitcoin-abc and bitcoin core on the same machine  (Read 256 times)
aaronson12 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 21, 2018, 06:54:16 PM
 #1

Has anyone here done that?

What should we be looking out for or should take note of specifically to make sure it all goes smoothly? All tips are appreciated. From some research, I know the datadir's and the port's used to map to the same place, but I don't know if this is still the case,

and what about the files installed themselves, do they map to the same directories and how should we re-work the code? ie. Can we run both daemons at the same time?
I'm a tech noob here, but 200% willing to learn and figure it all out. 

Thanks in advance!!
1715057006
Hero Member
*
Offline Offline

Posts: 1715057006

View Profile Personal Message (Offline)

Ignore
1715057006
Reply with quote  #2

1715057006
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 21, 2018, 07:21:22 PM
Last edit: April 21, 2018, 07:36:59 PM by Xynerise
 #2

Change the dadtadir and the port and you should be good to go, or better still, run the BCash node in a VM.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 21, 2018, 09:18:06 PM
Merited by Jet Cash (1)
 #3

Make two extra admin user profiles on your computer. One called "Bitcoin", the other called "BitcoinABC".

Use these accounts to run the relevant wallets (put the bitcoin-qt file in the desktop of each so you won't be tempeted to open it in the wrong one) and you should be good to go without any issues.

If you use the "switch user" commands for these accounts then they should both still be functioning in the background.

Or, in linux, running command by a different user than your own using a similar SU console command.

Change the dadtadir and the port and you should be good to go, or better still, run the BCash node in a VM.
While a vm is a good idea, it will slow you down a bit.
The datadir thing might not work so well unless you run it with that command every time (sometimes they regress or pick up the wrong config file).
starmyc
Full Member
***
Offline Offline

Activity: 198
Merit: 130

Some random software engineer


View Profile
April 21, 2018, 09:22:13 PM
 #4

The datadir thing might not work so well unless you run it with that command every time (sometimes they regress or pick up the wrong config file).

Using a different datadir is mandatory as both Bitcoin & BitcoinABC are using both $HOME/.bitcoin on Unices & %APPDATA%\Bitcoin on Windows. Not using a custom directory for one of the 2 daemons will make one not starting, and will lead to confusion and corruption.

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances/addresses listing dumps: https://balances.crypto-nerdz.org/
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 21, 2018, 09:27:16 PM
 #5

The datadir thing might not work so well unless you run it with that command every time (sometimes they regress or pick up the wrong config file).

Using a different datadir is mandatory as both Bitcoin & BitcoinABC are using both $HOME/.bitcoin on Unices & %APPDATA%\Bitcoin on Windows. Not using a custom directory for one of the 2 daemons will make one not starting, and will lead to confusion and corruption.

Can you reread my whole post?
If you use two user accounts, the default data directory will be put in a different appdata/roaming place or a different /home/%user%/.Bitcoin. Thus, there will be no collisions and there won't be an attempt to load the wrong block database and corrupt it.
starmyc
Full Member
***
Offline Offline

Activity: 198
Merit: 130

Some random software engineer


View Profile
April 22, 2018, 04:56:41 AM
 #6

Can you reread my whole post?
If you use two user accounts, the default data directory will be put in a different appdata/roaming place or a different /home/%user%/.Bitcoin. Thus, there will be no collisions and there won't be an attempt to load the wrong block database and corrupt it.

Using a different user account is an overkill solution and it won't fix the port issue either. And it won't solve the problem for a beginner user that will have to switch users, mostly using sudo, leading to other worst problems (if you can't handle a single -datadir or -config flag properly, I'm not really confident that he will manage its system properly).

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances/addresses listing dumps: https://balances.crypto-nerdz.org/
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16609


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
April 22, 2018, 05:47:03 AM
 #7

Make two extra admin user profiles on your computer. One called "Bitcoin", the other called "BitcoinABC".
I'm not a Windows user, but if this means running software with Admin privilages, I wouldn't recommend it.

Or, in linux, running command by a different user than your own using a similar SU console command.
This is actually very easy:
Code:
loyce@desktop:~$ sudo xhost si:localuser:test3
[sudo] password for loyce:
localuser:test3 being added to access control list
loyce@desktop:~$ su - test3
Password:
test3@desktop:~$ xeyes

Using a different user account is an overkill solution
Using a different account ensures untrusted software like BitcoinABC can't instantly access other data, although I'd prefer a VM for this.

starmyc
Full Member
***
Offline Offline

Activity: 198
Merit: 130

Some random software engineer


View Profile
April 22, 2018, 05:50:12 AM
 #8

Using a different user account is an overkill solution
Using a different account ensures untrusted software like BitcoinABC can't instantly access other data, although I'd prefer a VM for this.

You have lxc containers (docker) for this.

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances/addresses listing dumps: https://balances.crypto-nerdz.org/
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 22, 2018, 07:48:17 PM
 #9

Make two extra admin user profiles on your computer. One called "Bitcoin", the other called "BitcoinABC".
I'm not a Windows user, but if this means running software with Admin privilages, I wouldn't recommend it.
You don't have to run the software as admin, you just have to get an administrator's permission in order to run stuff without admin rights (mostly). It is simpler to run all as an admin but not necessary.

Or, in linux, running command by a different user than your own using a similar SU console command.
This is actually very easy:
Code:
loyce@desktop:~$ sudo xhost si:localuser:test3
[sudo] password for loyce:
localuser:test3 being added to access control list
loyce@desktop:~$ su - test3
Password:
test3@desktop:~$ xeyes
Yes it is quite a nice solution

Using a different user account is an overkill solution
Using a different account ensures untrusted software like BitcoinABC can't instantly access other data, although I'd prefer a VM for this.
What if OP can't run a vm? I can't on some of my computers, they need a certain virtualisation enhanced CPU (or something) to make them work.

Using a different user account is an overkill solution and it won't fix the port issue either. And it won't solve the problem for a beginner user that will have to switch users, mostly using sudo, leading to other worst problems (if you can't handle a single -datadir or -config flag properly, I'm not really confident that he will manage its system properly).

The SU command is different from sudo.
su-- is sudo.
su is merely switch user.
su jackg takes me to a user account called jackg (after inputting my password).
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 23, 2018, 10:44:36 PM
 #10

Has anyone here done that?
Yes. I run both Bitcoin Core and BitcoinABC on the same computer (Windows 10 Pro x64)... As an aside, I have also run Bitcoin Gold on this machine.


Quote
What should we be looking out for or should take note of specifically to make sure it all goes smoothly? All tips are appreciated. From some research, I know the datadir's and the port's used to map to the same place, but I don't know if this is still the case,
and what about the files installed themselves, do they map to the same directories and how should we re-work the code? ie. Can we run both daemons at the same time?
Be VERY CAREFUL when you install BitcoinABC. As you already know, it WILL attempt to hijack the datadir... and YES it WILL attempt to install itself over Bitcoin Core

That is to say, BitcoinABC will attempt, by default, to install to C:\Program Files\Bitcoin
and it will attempt, by default, to use the datadir C:\Users\YOURUSER\AppData\Roaming\Bitcoin

You CAN make it use it's own locations... you just need to be very careful when installing to specify a different install directory and when running the clients to ensure that you use the appropriate -datadir arguments when launching the apps (I modified the shortcut for Bitcoin ABC).

I can run both GUIs at the same time without issue. I don't use "-listen=1", so because I don't have incoming connections, I don't think having the same "port" is a problem. If you needed to use "listen=1" to accept incoming connections, I could see this being a potential issue.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
aaronson12 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 23, 2018, 11:28:16 PM
Last edit: April 23, 2018, 11:59:53 PM by aaronson12
 #11

thank you all! especially to jackg and LoyceV.

sorry, don't mean to get down to this level, but I get this error when running su to switch accounts in terminal (Mac OS X):  

Code:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

1) any idea how to get rid of it? I've tried to edit my sudo file with sudo visudo, a tip I found by googling, but it doesn't seem to help.

2) also, do you have to set the program files to have different names? e.g. how can I call bitcoin-cli and bitcoind for the two different implementations if they have the same name?!

in the meantime, I'll try what HCP suggested to install bitcoin-abc to a different install directory.

thank you all!!

aaronson12 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 23, 2018, 11:53:28 PM
 #12

Quote
I can run both GUIs at the same time without issue. I don't use "-listen=1", so because I don't have incoming connections, I don't think having the same "port" is a problem. If you needed to use "listen=1" to accept incoming connections, I could see this being a potential issue.


HCP, you set listen=0 in your config file for both? is that compatible with running mainnet?
thank you!!
aaronson12 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 24, 2018, 03:46:47 AM
 #13

ok, so an update:
I tried running bitcoind (abc) and in spite of setting my datadir in bitcoin.conf file which I specified ... it tried to hijack the original datadir. thanks HCP.
I ended up running it with both the conf and datadir arguments.
any idea why that's the case? shouldn't I be able to use just the conf file to specify the datadir?

waiting for the solution from jackg / others on the su issue. I will try that too! 

for anyone else wondering how I did it, I specified the installation folders with
Code:
./configure --prefix=$HOME --exec-prefix=$HOME

then I created a new folder for where Application Support/Bitcoin would go instead, /Bitcoin-abc and specified them while running bitcoind and in the conf files.
lastly, I created symlinks for $HOME/bitcoind into $PATH using ln -s:
Code:
ln -s /Users/homeuser/bin/bitcoind /usr/local/bin/bitcoind-abc
ln -s /Users/homeuser/bin/bitcoin-cli /usr/local/bin/bitcoinabc-cli


test it by
Code:
$ which bitcoind-abc
/usr/local/bin/bitcoind-abc
$ which bitcoinabc-cli
/usr/local/bin/bitcoinabc-cli



hope this helps others out there.
any comments on blind spots/improvements in this jerry-rigged version very welcome!
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 24, 2018, 04:30:19 AM
 #14

ok, so an update:
I tried running bitcoind (abc) and in spite of setting my datadir in bitcoin.conf file which I specified ... it tried to hijack the original datadir. thanks HCP.
I ended up running it with both the conf and datadir arguments.
any idea why that's the case? shouldn't I be able to use just the conf file to specify the datadir?
The issue is that the .conf file is located IN the "datadir"... so if you have a custom datadir, how is the application supposed to find the .conf file if it doesn't already know where the datadir is? Wink

Using the -datadir commandline argument when running bitcoind (or bitcoin-cli or bitcoin-qt) will let them find the custom datadir and therefore the .conf file at startup and read the appropriate parameters from that.


HCP, you set listen=0 in your config file for both? is that compatible with running mainnet?
No, I just leave the listen command out completely... It is the same as having the "Allow Incoming connections" UNCHECKED in the GUI option (ie. listen=1 is the same as enabling the "Allow Incoming connections" option). It just means that other nodes are not able to connect to your machine to retrieve block data, transactions etc.

It does not affect your ability to run on mainnet... it just makes your node more of a "leech" than a "seed".

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 24, 2018, 08:33:52 PM
 #15

thank you all! especially to jackg and LoyceV.

sorry, don't mean to get down to this level, but I get this error when running su to switch accounts in terminal (Mac OS X):  

Code:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

1) any idea how to get rid of it? I've tried to edit my sudo file with sudo visudo, a tip I found by googling, but it doesn't seem to help.

2) also, do you have to set the program files to have different names? e.g. how can I call bitcoin-cli and bitcoind for the two different implementations if they have the same name?!


Can you post your debug.log after running that command again and getting that error? I need to know a bit more. Also, once using the su command, did you run the whoami command to check it had changed your user correctly?
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!