Subject: Re: [bitcoin-dev] Announcing Libforesta

From: Davidson Souza <[email-masked]>
Date: Thu, 3 Aug 2023 20:34:04 +0000

Hi leohaf.

>Is this implementation able to start other nodes whether they are on the reference implementation or on Floresta?

You mean serve blocks to others? If so, Floresta is a prune-first node, meant to be used with only outgoing connections, so no.

>Is it possible to switch from Bitcoin Core to Floresta without causing a new IDB?

Not trivially, I think. The easiest way I could think of is someone handing you the position of each leaf in the accumulator, you could reconstruct it locally. If the acc have exactly​​ the UTXOs you expected, and is valid, then you just prune off all leaves and keep the roots, becoming a bridge node. This is lighter that IBD, but still a bit costly, I guess.

>Is Floresta backward compatible with Bitcoin Core's RPC commands?

I'm trying to get the most important rpcs closer to core. I won't promisse all of them, but ones used in the watch-only wallet and pulling general chain data will have a very close interface.

________________________________
De: [email-masked] <[email-masked]>
Enviado: quinta-feira, 3 de agosto de 2023 11:33
Para: Davidson Souza <[email-masked]>; Bitcoin Protocol Discussion <[email-masked]>
Assunto: Re: [bitcoin-dev] Announcing Libforesta

Hi, delighted to see an implementation of Utreexo.

I will just have a few questions about your implementation.

1) Is this implementation able to start other nodes whether they are on the reference implementation or on Floresta?

2) Is it possible to switch from Bitcoin Core to Floresta without causing a new IDB?

3) Is Floresta backward compatible with Bitcoin Core's RPC commands?

Le 31 juil. 2023 à 19:47, Davidson Souza via bitcoin-dev <[email-masked]> a écrit :

Hi, list. My name is Davidson, and I’m thrilled to share `libfloresta` with the Bitcoin devs mailing list!

This is a derivate of a project I’ve been developing for a few months, called `Floresta` (Portuguese for forest). An Utreexo powered, Fully-Validating Bitcoin Full node with integrated watch-only wallet and Electrum Server, meant to be a compact, simple, and ready to use full node for end users.

After some feedbacks and thoughts, I’ve decided to turn it into a series of reusable libs that can be used in other applications in a straightforward way. The main goal here is low-power devices, like SBC and smartphones, but can be used in any environment. To achieve that, I’m writing the main logic in Rust and will generate bindings to the original code and compiling to WASM, allowing it to run virtually anywhere.

The project is in an early stage, but I’m using it on signet for a while now with no problems. Mainnet support is almost ready, but we need to solve some performance issues with bridge nodes and set some up, so you can have utreexo peers.

The project is available on [my GitHub](https://github.com/Davidson-Souza/Floresta) and I wrote an initial [blogpost](https://blog.dlsouza.lol/2023/07/07/libfloresta.html) explaining how to use it (in Rust). I’ll write more as the project matures, and I get it running on other platforms. Any feedback is welcome!

## Consensus

I know that alternative implementations is a spicy subject in Bitcoin land, but this project **does not** reimplement the Bitcoin Consensus machine from scratch. I’m using `libbitcoinconsenus` and plan to use the full `libbitcoinkernel` in the future. While this doesn’t guarantee consistency, it minimizes misimplementations leading to splits.

I’m also making an extra effort into cross-test against Bitcoin Core to find any inconsistencies before it causes any trouble.

## Acknowledges

A special thanks to [Vinteum](https://vinteum.org/) for supporting my work with utreexo and Floresta.

Best regards,
Davidson Souza.
_______________________________________________
bitcoin-dev mailing list
[email-masked]<mailto:[email-masked]>
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev