Skip to content

Instantly share code, notes, and snippets.

View stickies-v's full-sized avatar

stickies-v

View GitHub Profile

Hosted by stickies-v at CoreDev 2025-02-26 at 16:00

Transcript

No transcript of the conversation.

Demo

The purpose of this demo was to showcase the py-bitcoinkernel Python libbitcoinkernel wrapper, with the specific focus on showing that this library makes it very low-barrier to explore and interact with the libbitcoinkernel interface. Specifically, on most platforms, the library can be installed from PyPI without dependencies, and basic interactions only take a few lines of code.

Hosted by glozow and stickies-v at CoreDev 2025-02-28 at 09:30

Transcript

What are the goals of the review club?

  1. Helping newcomers learn, beyond the conceptual/protocol knowledge
  2. We all have PRs that we all want to review, and having people to bounce questions/ideas on is really helpful, so why don't we all come together

Are these goals compatible? They could be: to answer newbie's questions, we also need experienced developers there to answer them.

@stickies-v
stickies-v / 2025-02-27-coredev-kernel-outstanding-questions.md
Created February 27, 2025 22:23
Libbitcoinkernel - outstanding questions

Hosted by TheCharlatan at CoreDev 2025-02-27 15:00, transcription by stickies-v

BlockManager, Chainstate, ChainstateManager

Chainstate keeps their own CChain class for keeping track of their chain of blocks, which is basically just BlockIndex entries, and manages the UTXO set.

ChainstateManager is there to orchestrate interactions between BlockManager and Chainstate and facilitate AssumeUTXO's multiple chainstates.

Currently, only ChainstateManager is exposed in kernel API. Should we instead expose structures that allows users to implement AssumeUTXO functionality by themselves? We could expose a Chainstate and Blockmanager to facilitate that.

Hosted by ryanofsky at CoreDev 2025-02-27 11:40, transcription by stickies-v

Transcript

Think of multiprocess in terms of the features it provides.

Multiprocess Features

The first main feature is modularization. Having a separate binary for gui, wallet, node, that prevent lockups between processes. This also allows to e.g. spin up multiple GUIs to a single node, or a node without wallet, ...

The second feature is the -ipcbind feature. In addition to be able to spawn process, we can listen to a socket which anyone can connect to. This allows third-parties (e.g. Stratum V2 as one current practical example) to hook into Bitcoin Core internals. ipcbind was of course required for the first feature (modularization), but it just offers more flexibility on top of that.

@stickies-v
stickies-v / 2025-02-27-block-validation-logic.md
Last active February 27, 2025 19:24
Block Validation Logic

Hosted by mzumsande at CoreDev 2025-02-27 10:20, transcription by stickies-v

Transcript

There are multiple stages to validating a block:

  1. Header Received
  2. Receive full block
  3. Connect block

The three steps can happen in different orders. In IBD, we first receive all the headers up to Consensus::Params::nMinimumChainWork before we ask for any blocks. Then we download up to 1024 blocks ahead of time, so we may be missing a block's predecessors. So the steps cannot be done sequentally. This is also why the IBD logs are "janky": sometimes nothing happens for a few seconds (because blocks are being downloaded), and then suddenly a lot of blocks can be connected. Downloading can be in parallel, but validation needs to be sequentially.

@stickies-v
stickies-v / 2025-02-27-coredev-txorphanage.md
Last active February 27, 2025 16:18
Orphan Handling + TxOrphanage
@stickies-v
stickies-v / abc24-kernel-workshop.md
Last active December 8, 2024 09:59
ABC2024: libbitcoinkernel workshop

libbitcoinkernel workshop

Date: 2024-12-08, Africa Bitcoin Conference 2024

Brief

In this workshop, we'll build a simple block data analysis tool. Rather than use the Bitcoin Core RPC interface, or parse raw block files, we'll be using the experimental, unreleased libbitcoinkernel. This workshop is aimed at more seasoned developers, please make sure to check you feel comfortable with the [[#Prerequisites]] listed below.

The libbitcoinkernel project is a new attempt at extracting Bitcoin Core's consensus engine. The kernel part of the name highlights one of the key functional differences from the deprecated libbitcoinconsensus and in fact, most libraries: it is a stateful library that can spawn threads, do caching, do I/O, and many other things that one may not normally expect from a library.