Bitcoin Forum
May 12, 2024, 11:18:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: My questions regarding wallet on: July 02, 2022, 02:30:57 PM
Let a signing device cost you ~$200. That's less than 1% of the price your coins are currently worth. For me that would be a no-brainer.

If your coins are Bitcoin only I would suggest you also buy a signing device that just supports Bitcoin. First it minimizes possible attack surfaces by eliminating code intended to support the other coins and second - at least for me - it is an ethical thing as I despise most of the crypto casino which one would indirectly help flourish. That would rule out the Trezor and Ledger mentioned above. The latter also had a serious leak of customer information which led to some threatening and blackmailing of customers. I even heard stories of people getting a visit from not so friendly people who wanted their coins. Maybe just rumors idk...

Considering the above I would advice you to buy a Foundation device or a Coldcard. Coldcard also deletes your customer information after some time (at least it says it does).

Best thing would be to pay with bitcoin, provide a false identity and let the shipment come to a place somewhere you have access to, but which is not exclusively identified with you. This way you mitigate some risks, since ordering a signing device directly to your home provides plenty of evidence about your financial business to outside people...

But don't let the hassle be a non-starter for NOT buying one.

2  Bitcoin / Bitcoin Technical Support / Re: Connect bitcoind to i2p network - problems with i2pd on: June 29, 2022, 02:50:07 PM
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?
3  Bitcoin / Bitcoin Technical Support / Connect bitcoind to i2p network - problems with i2pd on: June 28, 2022, 08:12:56 AM
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?!
4  Bitcoin / Bitcoin Technical Support / Re: Can anyone explain me here about the Lightning Network? on: June 26, 2022, 08:37:25 AM
As the "Mastering Bitcoin" book by Andreas Antonopoulos and various other contributors is a good read on Bitcoin L1 I expect the Lightning book https://github.com/lnbook/lnbook by him and peers to be an equally good read for L2. I haven't read it yet though.

If you insist on youtube I suggest you visit the channel of Rene Pickhardt https://www.youtube.com/user/RenePickhardt, a developer of lightning.
5  Bitcoin / Bitcoin Technical Support / Re: Make .cookie file readable for bitcoin group on: June 23, 2022, 08:50:49 PM
Thank you all for the discussion and your suggestions. The solutions @tadamichi @vv181 and @NotATether provided are exactly the thing I was looking for.

One final thing about grouping

And I don't think you need a separate bitcoin group. You just need bitcoin:bitcoin, and only assign the .cookie file as group readable, with the above command.

If I go with bitcoin:bitcoin and add every user who needs access to the .cookie file to the bitcoin group there is the potential that I give them all access to all other files only by falsely setting a group permission of a file. With a dedicated bitcoin:btcCookie group for the .cookie file there is an additional layer of protection - since the other files would still be owned by bitcoin:bitcoin only. I would have to mess up group ownership AND file permissions. Maybe a bit overkill, I know  but hey, why not Wink
6  Bitcoin / Bitcoin Technical Support / Re: Make .cookie file readable for bitcoin group on: June 22, 2022, 04:35:49 PM
Those are all valid manual  ways but I want to have my node do do this automatically. I should have been more precise in communicating my final goal:

I want to set-up the node in such a way that - once it has a power failure and power comes back - everything auto-starts without me setting groups, links or permissions.

  • power comes back, Pi OS starts
  • systemctl starts bitcoind which creates the .cookie file
  • once bitcoind is up, systemctl starts the indexer

So I could write a script which looks for the .cookie file and once it is created by bitcoind changes group and permissions. systemctl would have to wait for this script to finish before bringing the indexer back up since its user needs the permissions to work properly. I just though there is an easier way provided by bitcoind itself, as I thought that's the whole point of the .cookie file.
7  Bitcoin / Bitcoin Technical Support / Re: Make .cookie file readable for bitcoin group on: June 22, 2022, 03:21:25 PM
Hey, thanks for the answer.

Not sure if I'm missing something or don't understand the magic behind hard-linking to the users home but with my limited knowledge I see following problems:

As the .cookie file is always created anew on bitcoind start and removed once bitconid is stopped, I don't know if chgrp would set the group permanently for the file. I wouldn't expect it to, as it's always a new file with new content. That's also the reason why I went via the bitcoind.service route to set the group ownership.

And even it it would preserve the group, how can the hard-linking to the other users home extend the file permission from a file it couldn't read in the first place?
8  Bitcoin / Bitcoin Technical Support / Make .cookie file readable for bitcoin group on: June 22, 2022, 01:32:52 PM
Hey everyone,

happy to post my first question in THE bitcoin forum.

Problem
I just installed Bitcoin Core 22.0 on a Raspberry Pi4. As far as I understand it, the preferred authentication method for rpc calls should be via the .cookie file. Since I want to compartmentalize all software on the node I would have thought that the correct procedure is to create a dedicated group (say btcCookie) with read access to the .cookie file and then add the different users that need access to that group (I'm thinking of generic users like for an indexer). To create a dedicated group I changed the systemd bitcoin.service file to

Code:
[Service]
# Run as bitcoin:btcCookie
User=bitcoin
Group=btcCookie

This gave me indeed a dedicated group for the .cookie, bitcoind.pid and settings.json file. I'm not sure if it's a problem to have the pid and json file on the same group?!

Code:
bitcoin@debian:~/.bitcoin $ ll
total 183364
drwxrwx--- 5 bitcoin bitcoin        4096 Jun 22 14:32 .
drwxr-xr-x 3 root    root           4096 Mar 13 17:26 ..
drwx------ 3 bitcoin bitcoin      176128 Jun 22 06:20 blocks
drwx------ 2 bitcoin bitcoin      106496 Jun 22 14:37 chainstate
drwx------ 3 bitcoin bitcoin        4096 Apr  1 17:28 indexes
-rw------- 1 bitcoin btcCookie        75 Jun 22 14:32 .cookie
-rw------- 1 bitcoin bitcoin           0 Apr  1 17:28 .lock
-rw------- 1 bitcoin bitcoin          34 Apr  1 17:28 banlist.json
-rw-r--r-- 1 bitcoin bitcoin        5480 Jun 22 14:17 bitcoin.conf
-rw------- 1 bitcoin btcCookie         6 Jun 22 14:32 bitcoind.pid
-rw------- 1 bitcoin bitcoin   184060873 Jun 22 14:37 debug.log
-rw------- 1 bitcoin bitcoin      247985 Jun 22 14:27 fee_estimates.dat
-rw------- 1 bitcoin bitcoin     1799583 Jun 22 14:27 mempool.dat
-rw------- 1 bitcoin bitcoin     1282929 Jun 22 14:27 peers.dat
-rw-r--r-- 1 bitcoin btcCookie         7 Jun 22 14:32 settings.json

 Anyways, now I need to get the .cookie file in a readable state for the btcCookie group like so:

Code:
bitcoin@debian:~/.bitcoin $ ll
...
-rw-r----- 1 bitcoin btcCookie        75 Jun 22 14:32 .cookie
....

I've found someone with the same question https://www.reddit.com/r/Bitcoin/comments/9y1rtn/correct_way_to_use_cookie_auth_on_server/ but I'm not sure if his process is advisable and his outcome isn't problematic (in the process he also made mempool.dat and peers.dat group readable).

Another discussion re:permissions can be found here: https://bitcointalk.org/index.php?topic=5160894.0

Questions
1. How can I make the .cookie file group readable?
2. Is it problematic to have either or all of the following as group readable (bitcoind.pid, settings.json, mempool.dat and peers.dat)?
3. How can I prevent them from becoming group readable if so?
4. If no1 isn't possible, how can I provide other users with read access to the .cookie file?

Thank you and glad to be here!

Cheers,

RequestPrivacy
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!