coffee-tools / folgore

Universal Bitcoin backend for core lightning with BIP 157 support full based on the btcli4j Kotlin plugin! Ah, yes it is written in Rust
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Folgore

Universal Bitcoin Backend for Core lightning

Home Page

Universal Bitcoin backend for core lightning with BIP 157 support

Name History

The name of this plugin was choose by the community on twitter, and we choose the name folgore that means lightning in Italian (see). This idea was pretty cool because pin a the period where this plugin is born, in particular Italian Governament ban English words in some context, so I was thinking that this name was pretty cool for a plugin and also to joke around this Italian choice.

How to Install

To install the plugin in core lightning you need to have the rust installed

Install the plugin Manually

>> make
cp ./target/debug/folgore_plugin /home/<user>/.lightning/plugins

With a plugin manager

This plugin will support coffee as plugin manager, and it is also the raccomended way to install a this plugin in core lightning.

To install it you need just to install coffee and then run the following commands

>> coffee --network <your network> remote add folgore-git https://github.com/coffee-tools/folgore.git
>> coffee --network <your network> install folgore

How to configure

The plugin is developed to work out of the box without any extra configuration, but if you want make a customization, these are some configuration options:

How to run

Once plugin is successfully installed, you can simply run "lightningd" and plugin will start. However, you're supposed to run "lightningd" with "--disable-plugin bcli" option.

lightningd --network=<network-name> --disable-plugin bcli

for eg.

lightningd --network=testnet --disable-plugin bcli

BIP 157 support

This plugin allow the support of the BIP 157 Client Side Block Filtering in core lightning in a alpha mode.

In fact, the plugin is build on top of nakamoto with a bunch of fixes that are proposed as PR in the main repository, in addition the current version of the plugin is build on top of an core lightning RFC PR #6181, so the support the the BIP 157 is very experimental and there is still work to do.

However, it is the perfect time to stress test the plugin and report not known bugs, so please if you want test the BIP 157 support consider to install the plugin with one of the previous method, and then run lightnind with the option bitcoin-client=nakamoto and then report any bugs that you find with an issue.

In addition, if you are running the plugin with a not clean node, you should run nakamoto and wait that it will sync the initial information for the chain otherwise core lightning will crash because nakamoto return an older block height (this issue is fixed with the PR #6181 on core lightning).

To run nakamoto you can run the following command

git clone https://github.com/vincenzopalazzo/nakamoto.git && cd nakamoto
git checkout macros/client_model-fixes
cd node
cargo run -- --log debug --testnet

An than lets wait a while that nakamoto will sync with the network.

License

Universal Bitcoin backend for core lightning with BIP 157 support

Copyright (C) 2020-2021 Vincenzo Palazzo vincenzopalazzodev@gmail.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.