Bitcoin Forum
May 24, 2022, 03:09:22 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Bitcoin Core 0.21.0 no incoming peers over Tor  (Read 330 times)
crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
January 16, 2021, 12:04:33 PM
Last edit: January 16, 2021, 12:42:51 PM by crypto_curious
Merited by hugeblack (2), Foxpup (1), ETFbitcoin (1), Husna QA (1)
 #1

Hi,

I've been running full node for many months, Tor only.
Since I upgraded yesterday to Bitcoin Core 0.21.0, with new Tor v3 addresses, I have no incoming peers. Nothing else changed in my setup.
bitcoin-cli reports:

Code:
Uptime: 0d:15h:11m
Downloaded: 154 MB
Uploaded: 44 MB
Connections: 10
Onion address: ...onion:8333 (new long format)
Onion service score: 4

Normally I would have hundreds of MB uploaded by now and more than 20+ connections.

Any clues?
Can older Bitcoin Core (and other software) clients connect to Tor v3 addresses at all?
1653404962
Hero Member
*
Offline Offline

Posts: 1653404962

View Profile Personal Message (Offline)

Ignore
1653404962
Reply with quote  #2

1653404962
Report to moderator
1653404962
Hero Member
*
Offline Offline

Posts: 1653404962

View Profile Personal Message (Offline)

Ignore
1653404962
Reply with quote  #2

1653404962
Report to moderator
1653404962
Hero Member
*
Offline Offline

Posts: 1653404962

View Profile Personal Message (Offline)

Ignore
1653404962
Reply with quote  #2

1653404962
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
NotATether
Legendary
*
Online Online

Activity: 882
Merit: 2919


Resist all tyrants!


View Profile WWW
January 16, 2021, 05:17:25 PM
 #2

Your node probably can't find any other nodes running 0.21.0 with Tor turned on. Nodes running previous versions of Core don't understand Tor v3 and so can't connect to your address.

ranochigo
Legendary
*
Offline Offline

Activity: 2660
Merit: 3119

@ me if you need my response


View Profile
January 16, 2021, 05:27:21 PM
Last edit: January 18, 2021, 05:45:02 AM by ranochigo
Merited by Foxpup (2), ETFbitcoin (1)
 #3

I'm having the same problem as well. I think that it is because of the use of v3 addresses. The gossiping protocol was updated to support v3 addresses only in this release, if I'm not wrong via BIP155. Older clients wouldn't be able to receive and see your node as they are not able to receive ADDRv2 messages, which is also why peers.dat for this version is incompatible with the previous. Are any of your peers 0.21.0?

You can try replacing the information in onion_v3_private_key with onion_private_key and it should revert back to v2 address and should solve your problem, if you want.

Nodes running previous versions of Core don't understand Tor v3 and so can't connect to your address.
They don't understand addrv2 address type and thus won't connect to your node automatically.

There shouldn't be a problem if you're specifically connecting to that specific node using addnode/connect as long as your Tor version supports it, regardless of Core version. It doesn't check what kind of onion address type it is.


After reading the merged commits, there's more than the implementation of BIP155 and older nodes can't connect to v3 addresses as it won't recognize it though it doesn't throw an error when using connect=.

crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
January 16, 2021, 07:08:34 PM
 #4

Thanks for your replies.  Smiley I suspected that.

As per bitcoind-cli getpeerinfo, my outbound peers are:
Code:
0.18.1 (1)
0.19.1 (1)
0.20.0 (2)
0.20.1 (6)

10 outbound connections. 2 block-relay only, 8 full-relays. All via onion network, with old v2 addresses.

So if I understand correctly, I can reach Tor v2 nodes to connect to them, but Tor v2 nodes can't reach my Tor v3 node?
I will have to wait for people to upgrade to 0.21.0 and v3 onion?
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 3668
Merit: 6171



View Profile
January 16, 2021, 07:30:15 PM
Merited by Foxpup (2), ETFbitcoin (2), hugeblack (2), crypto_curious (2)
 #5

It may just take a  bit for the existing v3 peers to find out about you and bother connecting.

I don't think hacking to downgrade to v2 makes sense-- the tor network will be completely deactivating v2 in a couple months, so anything that hasn't migrated will just suddenly stop working.

Your node will work fine without any inbounds at all, and as more nodes switch over it'll be good that you're there providing capacity.

It's also likely the case that many of your prior connections were spies.  ... the spy companies tend to be really lazy and bad at their job (small blessings...), so I wouldn't be shocked if they didn't move off v2 until months after it was totally gone. Smiley 

There shouldn't be a problem if you're specifically connecting to that specific node using addnode/connect as long as your Tor version supports it, regardless of Core version. It doesn't check what kind of onion address type it is.
I'm pretty doubtful that will work.
crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
February 11, 2021, 09:25:59 PM
Last edit: February 12, 2021, 03:07:22 PM by crypto_curious
 #6

According to https://bitnodes.io/, 17.25% of all 8664 visible nodes are on version 0.21.0. That's 1494 nodes out there. Many of which will be on Tor, for sure.
Unfortunately, since upgrade 3 weeks ago I am yet to discover Incoming Tor peer on my 0.21.0 node. Current stats, since I restarted it few days ago:
Code:
Downloaded: 1313 MB
Uploaded: 537 MB
Connections: 10
Onion address: r..d.onion:8333
Onion service score: 4
Uptime: 4d:18h:56m
Process memory: 1782 MB

Is there anyone on 0.21.0 Tor only, who have Incoming peers? Maybe this is something we should look at more closely.
zx9r_
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
February 13, 2021, 06:35:28 PM
 #7


I upgraded to 0.21 on January 14. Tor only node. I dont get any inbound connection. Was running good on 0.20 with plenty of inbound connections.

Restarted today, catched an error message that could be the reason of this issue:


Quote
2021-02-13T15:08:33Z tor: Successfully connected!
2021-02-13T15:08:33Z tor: Connected to Tor version 0.3.2.10
2021-02-13T15:08:33Z tor: Supported authentication method: COOKIE
2021-02-13T15:08:33Z tor: Supported authentication method: HASHEDPASSWORD
2021-02-13T15:08:33Z tor: Supported authentication method: SAFECOOKIE
2021-02-13T15:08:33Z tor: Using HASHEDPASSWORD authentication
2021-02-13T15:08:33Z tor: Authentication successful
2021-02-13T15:08:33Z tor: Add onion failed; error code 513

What does that error code 513 mean ?

ranochigo
Legendary
*
Offline Offline

Activity: 2660
Merit: 3119

@ me if you need my response


View Profile
February 14, 2021, 02:47:06 AM
 #8


I upgraded to 0.21 on January 14. Tor only node. I dont get any inbound connection. Was running good on 0.20 with plenty of inbound connections.

Restarted today, catched an error message that could be the reason of this issue:


Quote
2021-02-13T15:08:33Z tor: Successfully connected!
2021-02-13T15:08:33Z tor: Connected to Tor version 0.3.2.10
2021-02-13T15:08:33Z tor: Supported authentication method: COOKIE
2021-02-13T15:08:33Z tor: Supported authentication method: HASHEDPASSWORD
2021-02-13T15:08:33Z tor: Supported authentication method: SAFECOOKIE
2021-02-13T15:08:33Z tor: Using HASHEDPASSWORD authentication
2021-02-13T15:08:33Z tor: Authentication successful
2021-02-13T15:08:33Z tor: Add onion failed; error code 513

What does that error code 513 mean ?


That Tor version is very old, I think it's from 2018. Can you try upgrading your Tor and try again?

zx9r_
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
February 14, 2021, 03:33:59 AM
 #9

That Tor version is very old, I think it's from 2018. Can you try upgrading your Tor and try again?


As far as I see I have installed the latest version:

Quote
ada@ada-VirtualBox:~/bitcoin/bin$ tor --version
Tor version 0.3.2.10 (git-0edaa32732ec8930).
ada@ada-VirtualBox:~/bitcoin/bin$ sudo apt install torbrowser-launcher
Reading package lists... Done
Building dependency tree       
Reading state information... Done
torbrowser-launcher is already the newest version (0.2.9-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

May be i'm missing something ? It is Ubuntu 18.04, not latest Ubuntu BTW
ETFbitcoin
Legendary
*
Offline Offline

Activity: 2240
Merit: 4363


100% Deposit Match UP TO €5000!


View Profile
February 14, 2021, 10:01:50 AM
 #10

That Tor version is very old, I think it's from 2018. Can you try upgrading your Tor and try again?


As far as I see I have installed the latest version:

Quote
ada@ada-VirtualBox:~/bitcoin/bin$ tor --version
Tor version 0.3.2.10 (git-0edaa32732ec8930).
ada@ada-VirtualBox:~/bitcoin/bin$ sudo apt install torbrowser-launcher
Reading package lists... Done
Building dependency tree       
Reading state information... Done
torbrowser-launcher is already the newest version (0.2.9-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

May be i'm missing something ? It is Ubuntu 18.04, not latest Ubuntu BTW

Actually Ubuntu is linux distro where you got stability, not latest version of application/library. But you can follow this guide (https://support.torproject.org/apt/tor-deb-repo/) to ensure you get newer version.

ranochigo
Legendary
*
Offline Offline

Activity: 2660
Merit: 3119

@ me if you need my response


View Profile
February 14, 2021, 10:18:20 AM
 #11

As far as I see I have installed the latest version:

May be i'm missing something ? It is Ubuntu 18.04, not latest Ubuntu BTW
That Tor version appears to be quite old, I think that was about the time they started incorporating Tor V3 addresses.

You want to download using the guide provided above. APT isn't always up to date and in this case appears to be unmaintained (from 2018).

NotATether
Legendary
*
Online Online

Activity: 882
Merit: 2919


Resist all tyrants!


View Profile WWW
February 14, 2021, 10:54:18 AM
 #12

513 error means "syntax error in configuration values" so your .torrc is invalid. Please post it here with sensitive information removed so we can see what's wrong with it. It is unrelated to your tor being old because the onion protocol hasn't been broken by censors yet, so a slightly old version would still continue to work.

Nevertheless, instead of finding an apt package with the latest Tor, which may not exist you can download and build Tor from source.

To compile and install Tor from git follow these steps:

Step 0: Make sure you have git, a working "C compiler" and "GNU make" installed on your linux box. You also need libevent-dev and libssl-dev libraries before you start.

If you're on debian/ubuntu type:

 
Code:
sudo apt-get install git build-essential automake libevent-dev libssl-dev zlib1g-dev
Step 1: Clone Tor from git.torproject.org

git clone https://git.torproject.org/tor.git
Step 2: cd tor
Step 3: run ./autogen.sh
Step 4: run ./configure or ./configure --disable-asciidoc if you don't want to build the manpages.
(See 'note' if you get error at this step)
Step 5: run make
Step 6 (optional): run make install

Note: If you have problems finding libraries at step 4 try the following instead:

Code:
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \ ./configure
or

Code:
./configure --with-libevent-dir=/usr/local
And if you have mysterious autoconf failures while linking openssl, consider setting your LD_LIBRARY_PATH to the openssl lib directory.

For example: setenv LD_LIBRARY_PATH /usr/your_username/lib.

see INSTALL for more details.

crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
February 14, 2021, 02:01:52 PM
Last edit: February 14, 2021, 03:00:46 PM by crypto_curious
 #13

My tor version:
Code:
$ tor --version
Feb 14 13:55:44.415 [warn] Tor was compiled with zstd 1.3.8, but is running with zstd 1.4.4. For safety, we'll avoid using advanced zstd functionality.
Tor version 0.4.5.5-rc.
This version of tor, from Debian buster-backports, is from Mon, 08 Feb 2021 08:12:45, that's very new - apt changelog shows:
Code:
tor (0.4.5.5-rc-1~bpo10+1) buster-backports; urgency=medium

  * Rebuild for buster-backports.
  * Remove dh-runit build dependency and --with-runit and --with-runit for backport.

 -- Peter Palfrader <weasel@debian.org>  Mon, 08 Feb 2021 08:12:45 +0100

libzstd versions:
Code:
$ dpkg -l | grep zstd
ii  libzstd-dev:amd64                       1.4.4+dfsg-3~bpo10+1                                             amd64        fast lossless compression algorithm -- development files
ii  libzstd1:amd64                          1.4.4+dfsg-3~bpo10+1                                             amd64        fast lossless compression algorithm
But that shouldn't be a problem, its just compression library.

I don't have any 0.21.0 peers:
Code:
bitcoin-cli getpeerinfo | grep subv
    "subver": "/Satoshi:0.20.0/",
    "subver": "/Satoshi:0.18.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.0/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.0/",

Also all outbound peers are Tor v2 onion hidden services, not v3, example:
Code:
2021-02-14T14:45:01Z New outbound peer connected: version: 70015, blocks=670586, peer=88, peeraddr=(16-character onion address).onion:8333 (block-relay)
No long v3 addresses have been observed, I checked all log files. My own tor hidden service works:
Code:
2021-02-14T10:49:35Z tor: Got service ID (very long onionddress), advertising service (very long onionddress).onion:8333
2021-02-14T10:49:35Z AddLocal(very (long onionddress).onion:8333,4)


Also, https://bitnodes.io/ see my node if I query my onion address on port 8333, I think that's very good. Anyway, still can't get any inbound connections.
zx9r_
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
February 14, 2021, 06:20:57 PM
 #14

My tor version:
Code:
$ tor --version
Feb 14 13:55:44.415 [warn] Tor was compiled with zstd 1.3.8, but is running with zstd 1.4.4. For safety, we'll avoid using advanced zstd functionality.
Tor version 0.4.5.5-rc.
This version of tor, from Debian buster-backports, is from Mon, 08 Feb 2021 08:12:45, that's very new - apt changelog shows:
Code:
tor (0.4.5.5-rc-1~bpo10+1) buster-backports; urgency=medium

  * Rebuild for buster-backports.
  * Remove dh-runit build dependency and --with-runit and --with-runit for backport.

 -- Peter Palfrader <weasel@debian.org>  Mon, 08 Feb 2021 08:12:45 +0100

libzstd versions:
Code:
$ dpkg -l | grep zstd
ii  libzstd-dev:amd64                       1.4.4+dfsg-3~bpo10+1                                             amd64        fast lossless compression algorithm -- development files
ii  libzstd1:amd64                          1.4.4+dfsg-3~bpo10+1                                             amd64        fast lossless compression algorithm
But that shouldn't be a problem, its just compression library.

I don't have any 0.21.0 peers:
Code:
bitcoin-cli getpeerinfo | grep subv
    "subver": "/Satoshi:0.20.0/",
    "subver": "/Satoshi:0.18.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.0/",
    "subver": "/Satoshi:0.20.1/",
    "subver": "/Satoshi:0.20.0/",

Also all outbound peers are Tor v2 onion hidden services, not v3, example:
Code:
2021-02-14T14:45:01Z New outbound peer connected: version: 70015, blocks=670586, peer=88, peeraddr=(16-character onion address).onion:8333 (block-relay)
No long v3 addresses have been observed, I checked all log files. My own tor hidden service works:
Code:
2021-02-14T10:49:35Z tor: Got service ID (very long onionddress), advertising service (very long onionddress).onion:8333
2021-02-14T10:49:35Z AddLocal(very (long onionddress).onion:8333,4)


Also, https://bitnodes.io/ see my node if I query my onion address on port 8333, I think that's very good. Anyway, still can't get any inbound connections.


DM your onion address and I can try to connect from my node to check if it works.

BTW, I'm upgrading my tor version as people suggested
crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
February 14, 2021, 10:00:15 PM
 #15

DM your onion address and I can try to connect from my node to check if it works.
Thanks, DM sent.
zx9r_
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
February 15, 2021, 01:27:39 AM
 #16

DM your onion address and I can try to connect from my node to check if it works.
Thanks, DM sent.


It seems OK, connected to your node with no issues.

DM with the details sent.
crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
February 15, 2021, 11:32:30 AM
 #17

Yes indeed this was successful. Anyone else wants to try? I can connect to you or you to me. Please DM.
NotATether
Legendary
*
Online Online

Activity: 882
Merit: 2919


Resist all tyrants!


View Profile WWW
February 15, 2021, 11:38:44 AM
 #18

Yes indeed this was successful. Anyone else wants to try? I can connect to you or you to me. Please DM.

I have a 0.20.1 node which I can upgrade to 0.21 if you want to see if I can connect.

If this works too it may simply be the proportion of tor 0.21.0 nodes are low compared to the rest of the network (that has Tor enabled).

crypto_curious
Full Member
***
Offline Offline

Activity: 834
Merit: 144


View Profile
February 15, 2021, 01:09:41 PM
 #19

Yes indeed this was successful. Anyone else wants to try? I can connect to you or you to me. Please DM.

I have a 0.20.1 node which I can upgrade to 0.21 if you want to see if I can connect.

If this works too it may simply be the proportion of tor 0.21.0 nodes are low compared to the rest of the network (that has Tor enabled).

Yes this is reasonable to think that this issue it a matter of 0.21.0 adoption rate.
However, what made me think was https://bitnodes.io/nodes/. They say, out of 10153 nodes, 1826 are 0.21.0. But when I think about it again, not many of that 1826 will be Tor enabled or Tor only, or willing to have another outbound node, and actually to me via Tor.

Code:
RANK USER AGENT NODES
1 Satoshi:0.20.1 2806 (27.64%)
2 Satoshi:0.21.0 1826 (17.98%)
3 Satoshi:0.20.0 1326 (13.06%)
4 Satoshi:0.18.1 674 (6.64%)
5 Satoshi:0.18.0 579 (5.70%)
6 Satoshi:0.19.1 464 (4.57%)

Please upgrade and let me know, I will be happy to try.  Smiley
Go-Overt
Copper Member
Newbie
*
Offline Offline

Activity: 20
Merit: 4

*^*


View Profile WWW
February 20, 2022, 06:24:43 PM
Last edit: February 20, 2022, 06:36:15 PM by Go-Overt
 #20

Actually, I am running Tor 0.4.6.9 (recommended) and I get `tor: Add onion failed; error code 513`.

What was the solution? I could manually add a service but what is the point?

Passupd - password changer
SecureWipe - secure wiper
https://bit.ly/2Frcwqy
Pages: [1] 2 »  All
  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!