Bitcoin Forum
May 05, 2024, 09:47:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multiple hidden services on 1 bitcoin node  (Read 189 times)
vinshet (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 17


View Profile
July 18, 2022, 02:14:31 PM
 #1

Hi,

Does anyone know if we can run multiple hidden services on 1 bitcoin node? I am planning to set up a bitcoin node with 10's of hidden services.
I know that I would manually have to create them, but I am not clear on the port situation for these services.


1714945629
Hero Member
*
Offline Offline

Posts: 1714945629

View Profile Personal Message (Offline)

Ignore
1714945629
Reply with quote  #2

1714945629
Report to moderator
1714945629
Hero Member
*
Offline Offline

Posts: 1714945629

View Profile Personal Message (Offline)

Ignore
1714945629
Reply with quote  #2

1714945629
Report to moderator
1714945629
Hero Member
*
Offline Offline

Posts: 1714945629

View Profile Personal Message (Offline)

Ignore
1714945629
Reply with quote  #2

1714945629
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714945629
Hero Member
*
Offline Offline

Posts: 1714945629

View Profile Personal Message (Offline)

Ignore
1714945629
Reply with quote  #2

1714945629
Report to moderator
1714945629
Hero Member
*
Offline Offline

Posts: 1714945629

View Profile Personal Message (Offline)

Ignore
1714945629
Reply with quote  #2

1714945629
Report to moderator
1714945629
Hero Member
*
Offline Offline

Posts: 1714945629

View Profile Personal Message (Offline)

Ignore
1714945629
Reply with quote  #2

1714945629
Report to moderator
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
July 18, 2022, 03:54:04 PM
Merited by hugeblack (3), ABCbits (1)
 #2

Hi,

Does anyone know if we can run multiple hidden services on 1 bitcoin node? I am planning to set up a bitcoin node with 10's of hidden services.
I know that I would manually have to create them, but I am not clear on the port situation for these services.
Yes you can!

Feel free to check out my [Guide] FULL NODE OpenSUSE 15.3: bitcoind + electrs + c-lightning + RTL, where I set up the Electrum server software as well as Core Lightning and Ride The Lightning all through Tor. Every service gets its own hidden service and its own Tor v3 onion address.

The same process I use in there can be applied to other software, too.
I would recommend sticking to this 'more manual' approach instead of the 9051 control port type stuff.

[6] Add the following contents, preferably in the right section (somewhere where there's HiddenServiceDir stuff commented out).
Code:
HiddenServiceDir /var/lib/tor/electrs_hidden_service/
HiddenServiceVersion 3
HiddenServicePort 50001 127.0.0.1:50001

ExitPolicy reject *:* # no exits allowed

Basically, you select a name you like for the 'HiddenServiceDir' (where you can later retrieve the corresponding onion address).
And you specify the port your software usually runs on, that you'd like to tunnel through Tor as HiddenServicePort.

Just add one of these 3-line blocks (last line only needed once) for each program, with chosen name and port to tunnel, to /etc/tor/torrc.

█▀▀▀











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











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

Activity: 3472
Merit: 6263


Crypto Swap Exchange


View Profile WWW
July 18, 2022, 07:27:06 PM
 #3

Also keep in mind if it gets a lot of hits that depending on what you are doing it will handle some requests in the order they are received NOT in a multi-threaded simultaneous way.
For the most part you should not care or even notice if you are only running 10s of services, but if you do something that is intensive it may cause other calls to wait.
Been there.....done that.

-Dave

█▀▀▀











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











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

Activity: 1596
Merit: 6728


bitcoincleanup.com / bitmixlist.org


View Profile WWW
July 19, 2022, 06:49:01 AM
Merited by DaveF (2)
 #4

Also keep in mind if it gets a lot of hits that depending on what you are doing it will handle some requests in the order they are received NOT in a multi-threaded simultaneous way.

Bitcoind uses a worker pool to divide up the incoming RPC calls, which has a size of 4 workers by default, can be changed from the command line. So actually by default it will be handling 4 RPCs at a time (assuming there are indeed 4 cores on the system).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7464


Crypto Swap Exchange


View Profile
July 19, 2022, 12:30:22 PM
Merited by DaveF (2)
 #5

Also keep in mind if it gets a lot of hits that depending on what you are doing it will handle some requests in the order they are received NOT in a multi-threaded simultaneous way.

Bitcoind uses a worker pool to divide up the incoming RPC calls, which has a size of 4 workers by default, can be changed from the command line. So actually by default it will be handling 4 RPCs at a time (assuming there are indeed 4 cores on the system).


Talking about workers size, i just remember Bitcoin Core also has option to configure queue size of RPC work. By default it's 16, which may not sufficient since OP plan to utilize 10 hidden services.

█▀▀▀











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











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

Activity: 3472
Merit: 6263


Crypto Swap Exchange


View Profile WWW
July 19, 2022, 01:03:37 PM
 #6

Also keep in mind if it gets a lot of hits that depending on what you are doing it will handle some requests in the order they are received NOT in a multi-threaded simultaneous way.

Bitcoind uses a worker pool to divide up the incoming RPC calls, which has a size of 4 workers by default, can be changed from the command line. So actually by default it will be handling 4 RPCs at a time (assuming there are indeed 4 cores on the system).


Also keep in mind if it gets a lot of hits that depending on what you are doing it will handle some requests in the order they are received NOT in a multi-threaded simultaneous way.

Bitcoind uses a worker pool to divide up the incoming RPC calls, which has a size of 4 workers by default, can be changed from the command line. So actually by default it will be handling 4 RPCs at a time (assuming there are indeed 4 cores on the system).


Talking about workers size, i just remember Bitcoin Core also has option to configure queue size of RPC work. By default it's 16, which may not sufficient since OP plan to utilize 10 hidden services.

Yes, what I typed was not what I thought. But AFAIK and from what @NotATether  said it's number of cores limited.  And I could be wrong on this once the call is in the queue it's there so even if the request is no longer needed it there will be no way to stop it from happening. I have not tested it since I tend to keep the number of things going on with my nodes low but I think that is the way it works.

-Dave

█▀▀▀











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











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

Activity: 1596
Merit: 6728


bitcoincleanup.com / bitmixlist.org


View Profile WWW
July 20, 2022, 05:53:00 AM
 #7

Yes, what I typed was not what I thought. But AFAIK and from what @NotATether  said it's number of cores limited.  And I could be wrong on this once the call is in the queue it's there so even if the request is no longer needed it there will be no way to stop it from happening. I have not tested it since I tend to keep the number of things going on with my nodes low but I think that is the way it works.

-Dave

I actually have not attempted to experiment with the RPC worker pools switch to test whether indeed Core forbids such a configuration, but it should be obvious that if you create more workers than there are hardware threads, you will not truly have N workers, only 4, or 8, or however many threads are present on your system - and it will actually slow the entire processing down as more time is wasted in the kernel's software scheduler.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!