talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Add support for rpccookiefile in teos.toml #246

Closed d6n13l0l1v3r closed 3 months ago

d6n13l0l1v3r commented 8 months ago

Description

In order to avoid username/passwords which are not the recommended config for bitcoind it would be great if i could import the rpccookiefile for bitcoind instead of using user/pass

Problem to be solved

corelíghthing, fulcrum , electrs, and most other tools i use utilize the cookie file to avoid using a static user:pass, but I'm unable to use rust-toes with this configuration because it appears as though there is no support for the cookie file

Proposed solution

allow rust-toes to use the cookie file for bitcoind rpc authentication

sr-gi commented 5 months ago

I looked at this and realized it may easily fixable than I initially thought. I'm wondering how the config looks in the other services you mention. Do you simply specify either user/pass or the file path, or does it default to use the cookie if the user/pass is not provided?

d6n13l0l1v3r commented 5 months ago

You only specify the path for cookie file Example

/data/bitcoin/.cookie

d6n13l0l1v3r commented 5 months ago

@sr-gi I don't know if you can see this as reference https://github.com/golden-guy/ckpool-solo/commit/3df23a6f4335591fc6f48de394d1b16df995dbdd

sr-gi commented 5 months ago

@d6n13l0l1v3r would you mind giving https://github.com/talaia-labs/rust-teos/pull/249 a go? The final version may slightly vary due to code review, but I'd like to know if this has the expected UX

d6n13l0l1v3r commented 5 months ago

sure I will test it as soon arrive to master until now I can download

image
sr-gi commented 5 months ago

You can test it by creating a separate branch and pulling from the PR branch:

git checkout -b rpcauth-patch
git pull https://github.com/sr-gi/rust-teos.git 2024-01-authcookie
d6n13l0l1v3r commented 5 months ago

on it

image image

I comment the user and password to test btc_rpc_cookie

image

start daemon

image

until now all looks fine

image

confirm that after one new block arrive teos receive it as expect

image

for me the change is ok

mariocynicys commented 5 months ago

Let's keep this open until #249 is merged.

0xSaksham commented 3 months ago

I would like to work on this.

sr-gi commented 3 months ago

I would like to work on this.

Check the linked PR. This has already been addressed, it just needs merging