How to setup a Full Node with Tor/i2p

Started by qvqc, Jun 20, 2021, 05:04 PM

Previous topic - Next topic

qvqc

Quote from: "wow4reedom, post:12, topic:588"Also, please note that when I carried out the step below:

Quote from: "qvqc, post:1, topic:588"open the editor with
> `sudo nano /etc/torrc`

It creates an empty file, then pasted in the 3 lines and saved the file, hence the file /etc/torrc did not exist in my /etc/ directory.

nice find..

this:

    sudo nano /etc/torrc    

should be this:

    sudo nano /etc/tor/torrc

add
```
HiddenServiceDir /var/lib/tor/wownero/
HiddenServicePort 34568 127.0.0.1:34568
HiddenServicePort 34566 127.0.0.1:34566
```
and restart tor

    /etc/init.d/tor restart

this wont solve wownerod not starting, post the log tail for that

wow4reedom

Hi @qvqc, thanks for the tip on how to view the log file.  
After spending some time looking through it, it seems to be in a loop (meaning the same lines repeat over and over).
I couldn't attached a Text file, so here's the copy-n-paste from the wownerod.log file output of a repeating section of the log...

    2021-07-19 15:41:09.420       7f51ed2e4780   INFO   global   src/daemon/protocol.h:79   Cryptonote protocol stopped successfully
    2021-07-19 15:41:09.421       7f51ed2e4780   ERROR   daemon   src/daemon/main.cpp:362   Exception in main! Failed to initialize p2p server.
    2021-07-19 15:41:10.794       7f8d0d22e780   INFO   logging   contrib/epee/src/mlog.cpp:273   New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.ssl:FATAL,net.p2p:FATAL,net.cn:FATAL,daemon.rpc:FATAL,global:INFO,verify:FATAL,serialization:FATAL,daemon.rpc.payment:ERROR,stacktrace:INFO,logging:INFO,msgwriter:INFO
    2021-07-19 15:41:10.795       7f8d0d22e780   INFO   logging   contrib/epee/src/mlog.cpp:273   New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.ssl:FATAL,net.p2p:FATAL,net.cn:FATAL,daemon.rpc:FATAL,global:INFO,verify:FATAL,serialization:FATAL,daemon.rpc.payment:ERROR,stacktrace:INFO,logging:INFO,msgwriter:INFO
    2021-07-19 15:41:10.795       7f8d0d22e780   INFO   global   src/daemon/main.cpp:294   Wownero 'Junkie Jeff' (v0.10.0.3-2bdd70d65)
    2021-07-19 15:41:10.795       7f8d0d22e780   INFO   global   src/daemon/protocol.h:53   Initializing cryptonote protocol...
    2021-07-19 15:41:10.795       7f8d0d22e780   INFO   global   src/daemon/protocol.h:58   Cryptonote protocol initialized OK
    2021-07-19 15:41:10.796       7f8d0d22e780   INFO   global   src/daemon/core.h:63   Initializing core...
    2021-07-19 15:41:10.796       7f8d0d22e780   INFO   global   src/cryptonote_core/cryptonote_core.cpp:517   Loading blockchain from folder /var/lib/wownero/lmdb ...
    2021-07-19 15:41:10.847       7f8d0d22e780   INFO   global   src/cryptonote_core/cryptonote_core.cpp:692   Loading checkpoints
    2021-07-19 15:41:10.847       7f8d0d22e780   INFO   global   src/daemon/core.h:73   Core initialized OK
    2021-07-19 15:41:10.847       7f8d0d22e780   INFO   global   src/daemon/p2p.h:63   Initializing p2p server...
    2021-07-19 15:41:10.848       7f8d0d22e780   INFO   global   src/daemon/core.h:94   Deinitializing core...
    2021-07-19 15:41:10.892       7f8d0d22e780   INFO   global   src/daemon/protocol.h:75   Stopping cryptonote protocol...
    2021-07-19 15:41:10.892       7f8d0d22e780   INFO   global   src/daemon/protocol.h:79   Cryptonote protocol stopped successfully

This is all jiberish to me (I'm a linux newbie) so I hope someone can make sense of it and let me know what I need to do to fix the issue so I can get my Wownero Full Node with Tor/i2p up and running.  Thanks in advance.

qvqc

sounds like config issue, can u post wownerd.conf here?

`cat /etc/wownerod.conf`

wow4reedom

Hi @qvqc, here's my wownerod.conf file ...

cat /etc/wownerod.conf

    check-updates=disabled
    confirm-external-bind=1
    data-dir=/var/lib/wownero
    log-file=/var/log/wownero/wownerod.log
    log-level=0
    no-igd=1
    p2p-bind-port=34567
    p2p-use-ipv6=1
    public-node=1
    restricted-rpc=1
    rpc-bind-ip=0.0.0.0
    rpc-bind-port=34568
    anonymous-inbound=lvy4crit5gcodniovffckwcwcto3gjgr3enwu4tsrki4x2ocq6ra.b32.i2p:34565,127.0.0.1:34565,64
    anonymous-inbound=vq5bn3dhzorkpc6g6xi4vruylpdvfw6nrdf7ylyxudunsa4rzm4hduid.onion:34566,127.0.0.1:34566,64

qvqc

a few fixes to make, had  old configs and screwed things up a little bit. thanks for helping me polish this :sweat_smile:

edit i2p config

`sudo nano /etc/i2pd/tunnels.conf`

make the config look like this

```
[wownero-rpc]
type = http
host = 127.0.0.1
port = 34568
keys = wownero-rpc.dat
[wownero-p2p]
type = server
host = 127.0.0.1
port = 34565
keys = wownero-p2p.dat
```
restart i2p  
`/etc/init.d/i2pd restart`
check here for p2p url ending in 34565 or install curl
`sudo apt install curl`
grab the p2p url
`curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34565"`


edit wownerod config
`sudo nano /etc/wownerod.conf`

 take the i2p p2p url received with curl and replace the current b32.i2p in wownerod.conf

`anonymous-inbound=UPDATETHISLINE:34565,127.0.0.1:34565,64`

and add these two lines to wownerod.conf:
```
tx-proxy=tor,127.0.0.1:9050,23
tx-proxy=i2p,127.0.0.1:4447,23
```
##### CTRL+X to save/exit

`sudo systemctl restart wownerod.service`

if wownerod fails again try editing wownerod.conf (sudo nano /etc/wownerod.conf) and setting debug from 0 to 1. restart wownerod (sudo systemctl restart wownerod.service) and paste the log (tail -n 100 /var/log/wownero/wownerod.log)

wow4reedom

Quote from: "qvqc, post:20, topic:588"anonymous-inbound=UPDATETHISLINE:34565,127.0.0.1:34565,64

Hey @qvqc, thanks for the clear instructions on what I need to update.

For the change requested above to the wownerod.conf , I want to confirm something as I have 2 lines starting with:  anonymous-inbound=...  
The 1st string value containing  .b32.i20:34565... and,
The 2nd string value containing  .onion:34566...

You only need me to update the 1st line and replace it with the new i2p p2p url received with curl.  

Do I leave the 2nd string intact with no changes needed?

qvqc

yes, you should have two anonymous-inbound= lines.

it should look similar to
```
anonymous-inbound=lvy4crit5gcodniovffckwcwcto3gjgr3enwu4tsrki4x2ocq6ra.b32.i2p:34565,127.0.0.1:34565,64
anonymous-inbound=vq5bn3dhzorkpc6g6xi4vruylpdvfw6nrdf7ylyxudunsa4rzm4hduid.onion:34566,127.0.0.1:34566,64
```
replace i2p url with the new p2p i2p url that you grabbed with curl, the line with onion is unchanged

wow4reedom

Hey @qvqc  I've successfully launched my Full Node with Tor/i2p :smile:  
Thanks again for putting together this Step-by-Step guide.  

Here's my Onion address:
 http://vq5bn3dhzorkpc6g6xi4vruylpdvfw6nrdf7ylyxudunsa4rzm4hduid.onion:34568

I've added it to - https://monero.fail/?crypto=wownero

qvqc

ahhyee :metal:

can also run this command (its looking for 34568 instead of 34565)
`curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34568"`

and get the i2p RPC url

u cant post i2p addresses on monero.fail but please share i2p p2p url and i2p rpc url here so we improve this network :+1:

wow4reedom

Quote from: "qvqc, post:24, topic:588"curl http://127.0.0.1:7070/?page=i2p_tunnels 2>&1 | grep -Eo "[a-zA-Z0-9./?=_%:-]*" | grep "34568"

Hey @qvqc, After going over your Step-by-Step guide several times I've noticed there are 3 different addressed that are generated.

Can you please demystify for us newbies (like myself) what is the significance of the following addresses with the different port numbers...

**A) Address ending with .onion** - it looks something like:
`vq5bn3dhzorkpc6g6xi4vruylpdvfw6nrdf7ylyxudunsa4rzm4hduid.onion`
It is used in the wownerod.conf file with port 34566 tacked on the end.

**B) Address ending with port number 34565** - looks something like:
`oscqc6nia6ledut7ufpffej2kkjeuoonibwxudajg3su2w7p32xa.b32.i2p:34565`

**C) Address ending with port number 34568** - looks something like:
`axrmv5ucdghi5b4fklx4kjta2c3cwygxs6ctme4tunbvmpmbnm7q.b32.i2p:34568`


**QUESTIONS**
  • 1) Which of these addresses should I add to my Custom Node list in Wowlet wallet?

  • 2) In what situations should I use Address A vs Address B vs Address C?

  • 3) Which of the above 3 addresses did you want us to post to this thread?

  • 4) In the Wownero world, what do the different acronyms mean i2p p2p and i2p rpc and why are they both needed?

   
Thanks.

qvqc

* RPC - clients(use with wowlet, wownero-wallet-cli) wallets connect to wownerod
* P2P - wownerod talks to other wownerod
* RPC port - 34568 (use with wowlet, wownero-wallet-cli)
* P2P port - 34567 (use with wownerod)
* Tor-RPC port - 34568 (use with wowlet, wownero-wallet-cli)
* i2p-RPC port - 34568 (use with wowlet, wownero-wallet-cli)
* Tor-P2P port - 34566 (use with wownerod)
* i2p-P2P port - 34565 (use with wownerod)

on Tor only one hiddenservice url is needed as it can handle multiple ports per service.  see this in the torrc created, multiple ports under one hiddenservicedir(one key) directory.  i2p works differently where it needs a separate tunnel for every port served.  see in the i2p tunnels.conf that we set a service for port 34565 and 34568 each with a separate key file

with anonymous-inbound and tx-proxy it sets wownerod to prefer relaying transactions over Tor-p2p and i2p-p2p.  you can use add-exclusive-node= in the wownerod in order to sync over i2p-p2p or Tor-p2p.

post all three urls.  p2p urls are for system admins who want to add as a peer to wownerod. rpc urls are for clients who need to use the wallet

cryptoriche

and.... I have exactly the same problem, but these steps did NOT fix it
It is currently syncing, but like Wow4freedom, I ran wownerod from the cli in the /var/lib/wownero folder i.e. ./wownerod....

wow4reedom

Thanks for all your help @qvqc and @wowario.
I believe I've resolved the errors and I have check that both the Wownerod and Tor services running.

As request here are my 3 URLs:
 
  • 1) Tor-P2P Address:
`http://vq5bn3dhzorkpc6g6xi4vruylpdvfw6nrdf7ylyxudunsa4rzm4hduid.onion:34566`

  • 2) P2P Address:
`http://oscqc6nia6ledut7ufpffej2kkjeuoonibwxudajg3su2w7p32xa.b32.i2p:34565`

  • 3) RPC Address:
`http://axrmv5ucdghi5b4fklx4kjta2c3cwygxs6ctme4tunbvmpmbnm7q.b32.i2p:34568`
 
Can someone please confirm that these URLs are in the correctly named?  Thanks

qvqc

Quote from: "cryptoriche, post:27, topic:588, full:true"and... I have exactly the same problem, but these steps did NOT fix it
It is currently syncing, but like Wow4freedom, I ran wownerod from the cli in the /var/lib/wownero folder i.e. ./wownerod...

set the log level to 1 from 0
```
sudo nano /etc/wownerod.conf
```
edit the line that says
```
log-level=0
```
to
```
log-level=1
```
**ctrl+x to exit/save**

post the log when running wownerod service

```
sudo systemctl start wownerod.service
tail -n 100 /var/log/wownero/wownerod.log
```

post a copy of your wownerod.conf
```
cat /etc/wownerod.conf
```

wow4reedom

Hey @qvqc / @wowario (or anyone else...),
I'm not sure if I'm using the wrong address in Wowlet, but no data is being transferred and hence the wallet is not syncing with my full node (see screenshot below)



Any troubleshooting tips?