cculianu / Fulcrum

A fast & nimble SPV Server for BCH, BTC, and LTC
Other
331 stars 76 forks source link

Fulcrum announcing on tor despite announce=false #158

Closed MrPeteypoo closed 1 year ago

MrPeteypoo commented 1 year ago

Hi, I've been using Fulcrum for a while and recently decided to disable the peering/announce functionality due to the limited bandwidth of my internet. Despite setting peering and announcing to false, and setting a blank tor_hostname my Fulcrum instance still seems to be accepting peers over Tor.

Here is my configuration file:

datadir = /data/fulcrum  # Windows: datadir = D:\FulcrumData\mainnet
bitcoind = [REDACTED]
rpccookie = [REDACTED]
tcp = 0.0.0.0:50001
tcp = ::0:50001
ssl = 0.0.0.0:50002
ssl = ::0:50002
cert = [REDACTED]
key = [REDACTED]
hostname = [REDACTED]
peering = false
announce = false
admin = [REDACTED]
stats = [REDACTED]
tor_hostname=
tor_tcp_port = 50001
tor_ssl_port = 50002

Here is my log:

Started Fulcrum daemon.
[2023-03-06 19:35:15.109] DB memory: 512.00 MiB
[2023-03-06 19:35:15.109] Coin: BTC
[2023-03-06 19:35:15.109] Chain: main
[2023-03-06 19:35:15.109] Verifying headers ...
[2023-03-06 19:35:16.368] Initializing header merkle cache ...
[2023-03-06 19:35:16.932] Checking tx counts ...
[2023-03-06 19:35:19.891] 811535822 total transactions
[2023-03-06 19:35:19.894] UTXO set: 84924816 utxos, 7133.685 MB
[2023-03-06 19:35:20.023] BitcoinDMgr: starting 3 bitcoin RPC clients ...
[2023-03-06 19:35:20.023] BitcoinDMgr: started ok
[2023-03-06 19:35:20.024] Stats HTTP: starting 1 server ...
[2023-03-06 19:35:20.024] Starting listener service for HttpSrv [REDACTED]...
[2023-03-06 19:35:20.024] Service started, listening for connections on [REDACTED]
[2023-03-06 19:35:20.120] <Controller> Block height 779618, up-to-date
[2023-03-06 19:35:20.120] SrvMgr: starting 5 services ...
[2023-03-06 19:35:20.120] Starting listener service for TcpSrv :::50001 ...
[2023-03-06 19:35:20.120] Service started, listening for connections on :::50001
[2023-03-06 19:35:20.121] Starting listener service for TcpSrv 0.0.0.0:50001 ...
[2023-03-06 19:35:20.121] Service started, listening for connections on 0.0.0.0:50001
[2023-03-06 19:35:20.121] Starting listener service for SslSrv :::50002 ...
[2023-03-06 19:35:20.121] Service started, listening for connections on :::50002
[2023-03-06 19:35:20.121] Starting listener service for SslSrv 0.0.0.0:50002 ...
[2023-03-06 19:35:20.121] Service started, listening for connections on 0.0.0.0:50002
[2023-03-06 19:35:20.121] Starting listener service for AdminSrv [REDACTED] ...
[2023-03-06 19:35:20.121] Service started, listening for connections on [REDACTED]
[2023-03-06 19:35:20.121] <Controller> Starting ZMQ Notifier (hashblock) ...
[2023-03-06 19:35:26.740] <TcpSrv 0.0.0.0:50001> New TCP Client.1245 127.0.0.1:44288, 1 client total
[2023-03-06 19:35:37.135] <TcpSrv 0.0.0.0:50001> New TCP Client.3050 127.0.0.1:40272, 2 clients total
[2023-03-06 19:35:40.718] <TcpSrv 0.0.0.0:50001> New TCP Client.3210 127.0.0.1:50826, 3 clients total
[2023-03-06 19:35:47.268] <TcpSrv 0.0.0.0:50001> New TCP Client.3253 127.0.0.1:50828, 2 clients total
[2023-03-06 19:35:50.213] <SslSrv 0.0.0.0:50002> New SSL Client.3281 127.0.0.1:33128, 3 clients total
[2023-03-06 19:35:52.952] <SslSrv 0.0.0.0:50002> New SSL Client.3316 127.0.0.1:52226, 4 clients total
[2023-03-06 19:35:54.997] <Controller> Block height 779619, downloading new blocks ...
[2023-03-06 19:35:55.381] <Controller> Processed 1 new block with 2156 txs (7071 inputs, 4954 outputs, 10146 addresses), verified ok.
[2023-03-06 19:35:55.381] <Controller> Block height 779619, up-to-date
[2023-03-06 19:35:57.303] <TcpSrv 0.0.0.0:50001> New TCP Client.3354 127.0.0.1:34822, 5 clients total
[2023-03-06 19:35:59.327] <TcpSrv 0.0.0.0:50001> New TCP Client.3361 127.0.0.1:34830, 5 clients total
[2023-03-06 19:36:01.516] <TcpSrv 0.0.0.0:50001> New TCP Client.3390 127.0.0.1:60780, 4 clients total
[2023-03-06 19:36:03.616] <TcpSrv 0.0.0.0:50001> New TCP Client.3410 127.0.0.1:60792, 4 clients total
[2023-03-06 19:36:08.146] <SslSrv 0.0.0.0:50002> New SSL Client.3448 127.0.0.1:52228, 5 clients total
[2023-03-06 19:36:14.988] <Controller> 3105 mempool txs involving 87900 addresses

To be clear, during this test I had only one instance of Sparrow connecting to my Fulcrum via Tor.

cculianu commented 1 year ago

Are you sure those are peers? Are you sure they are coming in over tor? And not your own wallet or something?

MrPeteypoo commented 1 year ago

Let me be absolutely sure and check again. It could be that I'm being stupid and have more local connections running. I'll confirm this hopefully on Thursday

MrPeteypoo commented 1 year ago

Are you sure those are peers? Are you sure they are coming in over tor? And not your own wallet or something?

Hi again, I realized I was being an idiot and still have my Mempool instance running and my Samourai Dojo instance running. Unfortunately after stopping them and closing all my wallets I'm still seeing 3-5 clients connecting via 127.0.0.1. Nobody has my address. Is it possible that because I previously announced my Fulcrum server that some clients are still aware of my onion address? Perhaps if I reset my onion address I'll no longer have any clients connecting to me?

cculianu commented 1 year ago

I don't know quite honestly. Yes that is possible.

MrPeteypoo commented 1 year ago

When I next have time I'll generate a new for hostname and see if it still happens. I'll get back to you later this week.

MrPeteypoo commented 1 year ago

Alright I got chance to test this. It wasn't the fault of Fulcrum. It seems what was happening is that some peers were remembering my tor hostname after I previously announced it. Generating a new hostname and running Fulcrum for 15 minutes causes no peers to connect. Sorry for the confusion.

Btw I really like Fulcrum, I'm not interested in BCH or LTC but it's fantastic for BTC! I'll be sure to donate a little, keep up the good work :+1:

cculianu commented 1 year ago

Hey thanks for the kind words and I'm glad it wasn't Fulcrum's fault. Yes, peers can remember you so yes I guess that makes sense that resetting the hostname did it. Cheers!