vulpemventures / nigiri

🍣 A delicious docker box for special Bitcoin, Lightning and Liquid cookings
https://nigiri.vulpem.com
MIT License
271 stars 44 forks source link

signet? #138

Open keblek opened 2 years ago

keblek commented 2 years ago

I can't find the docs on the website nor on the github.

Does this support bitcoin signet? Esplora has support for it.

How do I enable it?

tiero commented 2 years ago

Thanks for opening the issue! Nope, this only supports regtest for local test environment with single node.

In a fundamental way nigiri creates a regtest abstraction that does what signet is supposed to do (automatic block mining, plus faucet etc..)

But we def put in our backlog and find a way to activate it if community thinks is interesting to have ie. nigiri start --network signet --connect <signet-node.com>

keblek commented 2 years ago

ahh ok I see, well I am using this for sensei https://l2.technology/sensei and I wanted to see how it would work with signet and I am now realizing how complicated it is to start a signet electrum node just to see this small thing working

signet is very useful for LN devs, so if that if someone you want to target then I think it would be worthwhile if its not too much trouble to add

tiero commented 2 years ago

Some previous discussion on adding LN to nigiri can be found here https://github.com/vulpemventures/nigiri/issues/51

TL;DR Polar does a great job already and with a nice UI, so looked pointless to compete.

Can you share @keblek with us how would you prefer nigiri structure compared to polar? May be easier for us to discuss it and put priority on it.

keblek commented 2 years ago

I don't think you'd have to do anything that polar does. I just want a quick way to start a fully validating signet node. Sort of like what you have now but with signet.

tiero commented 2 years ago

Hey @keblek I have a draft PR that should allow you to run Bitcoin node in signet mode with nigiri start --signet

Would be very appreciated if you could try this out and tell me if all works good on your side.

I built the binaries for convenience for major os/archs https://github.com/tiero/nigiri/releases/tag/v0.4.0-rc.0

Looking forward to hear from you!

keblek commented 2 years ago

thank you so much!

how do I run it? I'm on mac, already tried a couple things and they didn't work.

I have docker installed and working correctly.

tiero commented 2 years ago

@keblek

  1. Download the binary for your architecture (either amd64 or arm64) and move to some folder
  2. sudo chmod a+x nigiri-darwin-<your_arch>
  3. rm -rf ~/Library/Application\ Support/Nigiri
  4. ./nigiri-darwin-<your_arch> start --signet
tiero commented 2 years ago

Did you manage to make it running? @keblek

keblek commented 2 years ago

I got it working, or at least I think it works.

Small tip, stupid macOS (of course) uses port 5000 when AirPlay receiver is turned on which interferes with esplora. Turn it off in the System Preferences.

The block explorer did not work, the page loaded but with an error message "We encountered an error. Please try again later."

➜  ./nigiri-darwin-arm64 start --signet
[+] Running 4/4
 ⠿ Network nigiri     Created                                                                                                                                                                                                                                                                                                                                          0.0s
 ⠿ Container bitcoin  Started                                                                                                                                                                                                                                                                                                                                          0.4s
 ⠿ Container electrs  Started                                                                                                                                                                                                                                                                                                                                          0.6s
 ⠿ Container esplora  Started                                                                                                                                                                                                                                                                                                                                          0.9s

ENDPOINTS
esplora localhost:5000
bitcoin localhost:38333
bitcoin localhost:38332
bitcoin localhost:48332
bitcoin localhost:48333
electrs localhost:50000
electrs localhost:30000

How would I connect this to clightning? That's what I was after. Are there default rpc credentials?

Thanks again for the help.

tiero commented 2 years ago

I got it working, or at least I think it works.

Small tip, stupid macOS (of course) uses port 5000 when AirPlay receiver is turned on which interferes with esplora. Turn it off in the System Preferences.

Wee added instructions about this https://github.com/vulpemventures/nigiri/pull/136 I think is unacceptable from Apple to use such low port for system services. They will eventually drop off

How would I connect this to clightning? That's what I was after. Are there default rpc credentials?

Thanks again for the help.

Yes, bitcoin node starts with admin1 and 123 respectively as rpc user/password, let me know if that works.

tiero commented 2 years ago

PS: @keblek FYI we adding support for LN (regtest mode for now) with both LND and CLN ran at same time

https://github.com/vulpemventures/nigiri/pull/144

Maybe you interested to follow this too 👍

matthiasdebernardini commented 2 years ago

I got it working! super easy to use