Bitcoin Forum
April 16, 2024, 08:42:51 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Connect bitcoind to i2p network - problems with i2pd  (Read 167 times)
RequestPrivacy (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 44


View Profile
June 28, 2022, 08:12:56 AM
Merited by LoyceV (6), Welsh (6), pooya87 (4), NotATether (4), ABCbits (3), DdmrDdmr (1), dkbit98 (1), vv181 (1)
 #1

I want to support bitcoin over the i2p network and minimize my reliance on tor and its continued DDoS attacks.

As I see it, my current problem is running i2p, specifically the i2pd implementation, NOT a problem with my bitcoind (running v.22). But since the intention is to use i2p primarily for bitcoin, I will post my question here in the forum.

What I did up until now

I tried to follow 402 Payment Requireds guide https://bitcointv.com/w/tdi2BXqPF2fhj6991Qn8vM (thank you) to enable bitcoin with i2p. I didn't add a new repository as suggested in his guide since I'm a bit hesitant to include third party ones. But the Debian repository of my Raspberry Pi 4 has an older v2.39 version of the i2pd included though.

Once installed I added following lines to the bitcoin.conf file:

Code:
debug=i2p
i2psam=127.0.0.1:7656
onlynet=i2p
addnote=a5qsnv3maw77mlmmzlcglu6twje6ttctd3fhpbfwcbpmewx6fczq.b32.i2p:0
addnote=bitcornrd36coazsbzsz4pdebyzvaplmsalq4kpoljmn6cg6x5zq.b32.i2p:0
addnote=c4gfnttsuwqomiygupdqqqyy5y5emnk5c73hrfvatri67prd7vyq.b32.i2p:0
addnote=dhtq2p76tyhi442aidb3vd2bv7yxxjuddpb2jydnnrl2ons5bhha.b32.i2p:0
addnote=h3r6bkn46qxftwja53pxiykntegfyfjqtnzbm6iv6r5mungmqgmq.b32.i2p:0

I pulled the i2p nodes from the bitcoin repository https://github.com/bitcoin/bitcoin/blob/master/contrib/seeds/nodes_main.txt. Then I did:

Code:
pi@debian:~ $ sudo systemctl enable i2pd
pi@debian:~ $ sudo systemctl start i2pd

and started bitcoind. Sadly no outbound connections where made via i2p.

Troubleshooting

I noticed that i2p kept quitting  after a couple of minutes.

Code:
pi@debian:~ $ systemctl status i2pd
● i2pd.service - I2P Router written in C++
     Loaded: loaded (/lib/systemd/system/i2pd.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Tue 2022-06-28 09:05:51 CEST; 46min ago
       Docs: man:i2pd(1)
             https://i2pd.readthedocs.io/en/latest/
    Process: 209789 ExecStart=/usr/sbin/i2pd $DAEMON_OPTS (code=exited, status=0/SUCCESS)
   Main PID: 209790 (code=killed, signal=SEGV)
        CPU: 2.008s

Jun 28 09:02:49 debian systemd[1]: Starting I2P Router written in C++...
Jun 28 09:02:49 debian systemd[1]: Started I2P Router written in C++.
Jun 28 09:05:51 debian systemd[1]: i2pd.service: Main process exited, code=killed, status=11/SEGV
Jun 28 09:05:51 debian systemd[1]: i2pd.service: Failed with result 'signal'.
Jun 28 09:05:51 debian systemd[1]: i2pd.service: Consumed 2.008s CPU time.

In the logs a bunch of following output is provided (note, the first block was where I originally started i2pd first, the second block shows the output once I restart it now):

Code:
pi@debian:~ $ sudo cat /var/log/i2pd/i2pd.log
18:11:31@261/error - RouterInfo: Can't open file
18:11:31@261/warn - NetIface: interface with yggdrasil network address not found
18:11:31@71/warn - SSU: Can't connect to unreachable router and no ipv4 non-expired introducers presented
18:11:31@261/warn - Addressbook: Can't open /var/lib/i2pd/addressbook/addresses.csv
18:11:31@261/error - Addressbook: resetting eTags
18:11:31@261/warn - Addressbook: subscriptions.txt usage is deprecated, use config file instead
18:11:31@261/error - Clients: can't open file /var/lib/i2pd/irc-keys.dat Creating new one with signature type 7 cry>
18:11:31@261/error - Addressbook: Can't find domain for irc.postman.i2p
18:11:31@261/warn - I2PTunnel: Remote destination irc.postman.i2p not found
18:11:31@71/warn - SSU: Missing fragments from 0 to 0 of message 1850705242
18:11:31@71/warn - SSU: Missing fragments from 0 to 0 of message 4245777171
18:11:32@71/warn - SSU: Missing fragments from 0 to 0 of message 1303596989
18:11:32@71/warn - SSU: Missing fragments from 0 to 0 of message 3611222500
18:11:33@846/warn - Profiling: no profile yet for QaIlFqFcZI3JqQsVU~yXqB4p2UUGqIr6Tl3gaUtmWAQ=
18:11:33@846/warn - Profiling: no profile yet for d-Ovz7dWY4lBPFycY8xL80VhXkfPt5N29IkoVypTLTc=
18:11:33@846/warn - Profiling: no profile yet for mIxIckjq~KJ93jd8oJE5-oaSKS~cPK-SUBGXX0-bEeQ=
18:11:33@846/warn - Profiling: no profile yet for -y~PbE0VC1WNrHouLjDD-UBljz3pY4a2sQiqfv6Mssk=
18:11:33@846/warn - Profiling: no profile yet for vs86U33udR9TgPhsDGpHXQOcDwYPOWrtNZXfvLkFCCc=
18:11:33@846/warn - Profiling: no profile yet for cV7Umzmk560C7OB4-3~bdBT3kPcuatw-K8hHmlbN45M=
...
09:02:49@820/warn - SSU: Missing fragments from 0 to 0 of message 4132560932
09:02:49@820/warn - SSU: Missing fragments from 0 to 0 of message 2086179642
09:02:49@600/warn - Addressbook: subscriptions.txt usage is deprecated, use config file instead
09:02:49@820/warn - SSU: Missing fragments from 0 to 0 of message 1468714441
09:02:49@157/warn - NTCP2: SessionCreated read error: End of file
09:02:50@820/warn - SSU: Missing fragments from 0 to 0 of message 338593495
09:02:50@820/warn - SSU: Missing fragments from 0 to 0 of message 2504363861
09:02:50@820/warn - SSU: MAC verification failed 60 bytes from <some IP, redacted by me>
09:02:51@13/warn - Profiling: no profile yet for R~cPb1~sHRbxoHl~el30UrbQzVWaJcj-mLS9F~uXKqU=
09:02:51@13/warn - Profiling: no profile yet for QkilYq-At3F8lHAQ-RDfSDWHz5~PjRrMsr0GLbbwFsc=
09:02:51@13/warn - Profiling: no profile yet for M2KRZ0Pf5ov5wu1QbJxJ15~mgnDEN4POZgaIR5sG8R8=
09:02:51@13/warn - Profiling: no profile yet for SgFDTqriG6nRJwVRHgkYJm8y4L6-qDrdOgjPWmxRj24=
09:02:51@13/warn - Profiling: no profile yet for q3vwbzfOi8vSOr9~RsdwOHSZWDf1HzEzIaDFNsHCmZI=
09:02:51@13/warn - Profiling: no profile yet for vvnfV7EWRHAR8TvoDGFx98xsMIlbrGFF4r-9yYMpsg8=
09:02:51@13/warn - Profiling: no profile yet for f4J1ye~T968uIkQG4523yaGPQ7I-CoKy5ZmtJms1DuE=
09:02:51@13/warn - Profiling: no profile yet for vPfUm3fw6hAwHaWlIaxWmLlH7x2ewPm~Xf4gmX8JMDg=
09:02:51@13/warn - Profiling: no profile yet for BbgtgUFcIo26zZUxWT67qyjM9Gv28cJ21GbRdC-bToE=
09:02:51@13/warn - Profiling: no profile yet for LjBCWdmoBzqOxYvkJA8L8KEUbMqJvW7vo8yNsmpldWw=
09:02:51@13/warn - Profiling: no profile yet for 31L27mVVsWcvIj8FmeJL~J1KEYgT4aO~PsJB8N6dLUs=
09:02:51@13/warn - Profiling: no profile yet for Q0-DPqQspdh93zxN0lCkcPRO2Z5qBvZZXUi2rZ8EfkY=
...

If I try to acccess the i2pd router webconsole on 127.0.0.1:7070 it works but says my network is firewalled.

Questions

1) Is somebody running bitcoind with i2pd? Is there the need to configure some i2pd conf files?
2) Do I need to open ports on the router of my home network? My intention would be to have only outgoing bitcoind traffic. Not sure why I would need open ports for incoming one - but maybe I don't understand how i2p works?!
1713256971
Hero Member
*
Offline Offline

Posts: 1713256971

View Profile Personal Message (Offline)

Ignore
1713256971
Reply with quote  #2

1713256971
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713256971
Hero Member
*
Offline Offline

Posts: 1713256971

View Profile Personal Message (Offline)

Ignore
1713256971
Reply with quote  #2

1713256971
Report to moderator
1713256971
Hero Member
*
Offline Offline

Posts: 1713256971

View Profile Personal Message (Offline)

Ignore
1713256971
Reply with quote  #2

1713256971
Report to moderator
1713256971
Hero Member
*
Offline Offline

Posts: 1713256971

View Profile Personal Message (Offline)

Ignore
1713256971
Reply with quote  #2

1713256971
Report to moderator
NotATether
Legendary
*
Offline Offline

Activity: 1568
Merit: 6668


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 29, 2022, 05:49:21 AM
Merited by NeuroticFish (4), pooya87 (2), ABCbits (2), RequestPrivacy (2)
 #2

The config directive to add nodes is called addnodes not addnotes (there is a d not a t).

Also, you should check if the nodes that you are directly connecting to are online, you can do this by either pinging the address, or attempt to directly make a connection to the I2P node by itself.

Firewalls should not be blocking the control panel because it is hosted on localhost. But try disabling the firewall anyway and see what happens.

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

Activity: 1932
Merit: 1273


View Profile
June 29, 2022, 09:25:05 AM
Last edit: June 29, 2022, 10:04:50 AM by vv181
Merited by NeuroticFish (4), RequestPrivacy (3), pooya87 (2), ABCbits (2)
 #3

1) Is somebody running bitcoind with i2pd? Is there the need to configure some i2pd conf files?

I tried i2pd today, and I also notice it keeps quitting. Seems there is something wrong with ip2d v2.39 and Bitcoin Core.

The last log before it got SEGV was:
Code:
15:52:25@973/error - Garlic: Failed to decrypt message

2) Do I need to open ports on the router of my home network? My intention would be to have only outgoing bitcoind traffic. Not sure why I would need open ports for incoming one - but maybe I don't understand how i2p works?!

Nope.
I2P will work fine when firewalled, there is no reason for concern. When firewalled, the router uses "introducers" to relay inbound connections.


You might want to try to update it to the latest version. Or just use the official implementation, I2P Router, I do use it, and so far there haven't been any problems.

The installation could be done by following: https://geti2p.net/en/download/debian#debian. Then enable the SAM on the configuration page(http://127.0.0.1:7657/configclients). With the corrected bitcoin config, you should be good to go.

RequestPrivacy (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 44


View Profile
June 29, 2022, 02:50:07 PM
Last edit: June 29, 2022, 03:02:56 PM by RequestPrivacy
 #4

The config directive to add nodes is called addnodes not addnotes (there is a d not a t).
Good catch, thanks for that. I disabled all of them now though, since I wanted to try if bitcoind finds nodes without my help once I got my i2p problem sorted out (I initially added them bc I thought i2pd may need some traffic to prevent the automatic stopping of the i2pd.service. Turns out that isn't true and the problem was rooted in the i2pd since the standard I2P router works).


You might want to try to update it to the latest version. Or just use the official implementation, I2P Router, I do use it, and so far there haven't been any problems.

The installation could be done by following: https://geti2p.net/en/download/debian#debian. Then enable the SAM on the configuration page(http://127.0.0.1:7657/configclients). With the corrected bitcoin config, you should be good to go.
I followed your provided resources and installed the official java I2P router and enabled the SAM bridge. The i2p side of things seem to work now. I can see bandwidth and memory usage, as well as peer count and tunnels in the I2P Router Console. Thanks for that!

My bitconid seems to prefer onion sites though. I haven't seen it to connect to i2p bitcoin nodes i.e.

Code:
bitcoin@debian:~/.bitcoin $ bitcoin-cli -addrinfo

bitcoin@debian:~/.bitcoin $ bitcoin-cli -netinfo 4

bitcoin@debian:~/.bitcoin $ bitcoin-cli getpeerinfo
show me bitcoind found only 5 i2p peers - but they must have been dropped, since the last command always shows non-i2p nodes (I'm looking once in a while, 1h running).

How does bitcoind choose to distribute peers across networks? Do I have to change the available bandwidth of my i2p router so it can "compete" better with e.g. tor?
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
June 30, 2022, 07:01:25 PM
Merited by ABCbits (1)
 #5

Do I have to change the available bandwidth of my i2p router so it can "compete" better with e.g. tor?
I don't think that would do much help. I guess that's more on the current availability of i2p peers on bitcoin rather than on the i2p itself.
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!