On Libbitcoinkernel Readyness

On Libbitcoinkernel Readyness
From: Antoine Riard @ 2024-10-20  6:56 UTC ( / )
  To: Bitcoin Development Mailing List




Hello list,

During the summer, I hacked a bit on the bitcoind build system and the
libbitcoinkernel projects to see how far it was ready to be used on its
own. Personally, I've always been interested to run the historical bitcoin
consensus engine on its own only in secure enclave to reduce the exposure
surface and this enclave only getting transactions and blocks [0].

As a reminder for the libbitcoinerkernel, for the folks who are less
familiar with this project, see the following [1] [2].

The current way of using libbitcoinerkernel is a bit shaggy for now,
especially if you don't have experience with build systems on embedded
systems, so for whom can be interested, I made a public an extraction
of the libbitcoinkernel files and with a working build system in a
standalone repository.

https://github.com/ariard/standalone-bitcoinkernel

Of course, this has been to have been tested on all the *nix, or
a bunch of different ISAs, though normally it compiles quite good.
I believed it could be interesting for people who wish to re-write
their own full-node or wrapped it as component for other usage in
the bitcoin stack. Doing those, without having to re-write from
scratch a compatible consensus engine, bug for bug.

Either using the C++ api or linking against the static library
directly is probably very rough, though if there are already
full-node implementation in go, cpp or whatever another language,
maybe it's mature enough for them to experiment or test it as a
"monitor" consensus engine to check there is no differential in
block validation with their current consensus engine. I'll see to
peg that standalone consensus engine utility with some rust code to
see how it looks like.

If you find bugs in the build system or around the C++ validation
interface, please be nice and report them accordingly.

Cheers,
Antoine
ots hash: a50ace52cfabade91d0fbb95f824a5f9607a251cdf8c4d34381ea2d86725bef5

[0] 
https://gitlab.com/lightning-signer/validating-lightning-signer/-/issues/188
[1] https://github.com/bitcoin/bitcoin/issues/24303
[2] 
https://bitcoin.stackexchange.com/questions/113863/in-future-will-multiple-widely-used-implementations-around-libbitcoinkernel-be-a

--