Bitcoin full node and query server

February 2024

Archive of the libbitcoin Slack #general channel.

Thursday, February 1, 2024

pmienk18:05
Topic: Dev Weekly Status Time: February 1, 2024 01:00pm Pacific Time (US and Canada) Join Zoom Meeting https://us05web.zoom.us/j/87666370902?pwd=bEZDUlJ0MGJ5V3dVMUhVdHl5QzdFdz09 Meeting ID: 876 6637 0902 Passcode: 85U0bF

Monday, February 12, 2024

evoskuil14:47
Making good progress again on node. I've stubbed in all of the "chaser" objects and implemented their initialization, destruction, and messaging. The design calls for each chaser on an independent strand, which allows them to perform long-running and expensive operations concurrently given enough threads. Each is registered to receive it's triggering event(s) via a subscriber which is retained by the full_node class, which operates on the network strand. Events are created by the other chasers. Protocols negotiate for objects (e.g. headers/txs/blocks) over the wire and submit these to chasers, which manage chain state, such as the tx pool (DAG) and header tree as well as the parallel block download queue. The submission of these objects to the appropriate chaser is the external trigger for chaser activity. Protocols also register for events, such as to broadcast a newly confirmed block/compact or accepted transaction and to download blocks that have been accepted via candidate headers messages.
(edited)
🎉 2
The event system and isolation of independent organization semantics into asynchronous objects (chasers) significantly decouples and simplifies implementation logic. This is the blockchain (organization) analogy to the independent p2p protocols.

Wednesday, February 14, 2024

evoskuil21:28
X (formerly Twitter)
My mainnet btcd v0.24 mainnet (monitoring) node is stuck on block 830326: [ERR] SYNC: Failed to process block 00000000000000000001a22c1c720af27eb193d3bc95371df04404eabe24f56e: assertion failed: view missing input 4538124686f31fdef2930639c5957e72af5796a078127548b58b783420f56e2f:1
😬 1

Thursday, February 15, 2024

pmienk17:00
Topic: Dev Weekly Status Time: February 15, 2024 01:00pm Pacific Time (US and Canada) Join Zoom Meeting https://us05web.zoom.us/j/87666370902?pwd=bEZDUlJ0MGJ5V3dVMUhVdHl5QzdFdz09 Meeting ID: 876 6637 0902 Passcode: 85U0bF
👍🏻 1
evoskuil21:05
coming, zoom is updating, slowly
(edited)

Sunday, February 18, 2024

evoskuil18:00
I've completed the concurrent header sync implementation. This adds a "chaser" to maintain state across connections, where previously we could only run one connection at a time when syncing headers. The chaser maintains a "currency window" which is set to 60 minutes. Headers older than this are cached in a std lib hash table, along with their validation chain state (which gets stored in the database with each header). When a header chain is both "strong" (more work than the database candidate chain) and "current", the headers from the hash table are moved to the store, and these and any that were not previously in the strong branch are "candidated" (ordered into the candidate chain). This is like block confirmation in the "confirmed" chain, except that the candidate chain is the strongest valid *header* chain available. This is always at least as strong as the confirmed chain and they are usually the same. I just noticed a startup on 10 peers where we went from process startup with empty store to fully-populated and validated candidate chain (831,014 headers) in 17 seconds. Anything under a minute is pretty reasonable given that we don't optimize peer connections (drop slow ones) when syncing headers, as we don't want to prioritize large/fast peers. It's been up and running for a few days with no issues, performing both the initial header sync and ongoing updates in the same logic.
(edited)
🎉 2👍 1

Monday, February 19, 2024

neillm21:03
This means headers are complete?
2024-02-19T21:01:54Z.1 Headers from [71.163.41.211:8333] complete at (831164).
Just checking, as it does say complete. Took about 40 seconds here
evoskuil21:30
Yeah, that’s the indication that the peer headers were exhausted.
Did you seed it first? That can take some time. Not sure whether my config makes a difference. But in any case I see 30-45 secs sometimes too.
neillm23:49
That time was from a fresh start, so it included seed time
Wasn't complaining, btw -- it's still a fast run!
evoskuil23:53
It’s a start :)
🎉 2

Thursday, February 22, 2024

pmienk19:04
Topic: Dev Weekly Status Time: February 22, 2024 01:00pm Pacific Time (US and Canada) Join Zoom Meeting https://us05web.zoom.us/j/87666370902?pwd=bEZDUlJ0MGJ5V3dVMUhVdHl5QzdFdz09 Meeting ID: 876 6637 0902 Passcode: 85U0bF
👍🏻 1

Saturday, February 24, 2024

evoskuil22:39
Competitive headers first protocol is complete, as is competitive blocks-first. The former is the lead stage of parallel block download. The latter kicks in on (way old, can't find any) pre-headers channels (though it's not ideal to run them together, as blocks will orphan against headers).
🫡 1
Blocks-first works just like v3. It can be run by hardwiring it enabled despite headers-first protocol version (required for most peers out there). Took a few days to do blocks first, which preserved the feature of being able to operate at any configured protocol and/or fork levels.
(edited)
🫡 1

Tuesday, February 27, 2024

evoskuil20:51
X (formerly Twitter)
Yes. Bitcoins' update process through Core is dead. The way forward is using competing implementations.
😬 1💯 1

Wednesday, February 28, 2024

evoskuil01:54
Spent the day today refactoring the headers first and blocks first protocols and chasers to properly allow for forking below the top. Stupid, and I ended up doing what I remember doing in the || download prototyping work a few years ago. Working well though, even a bit simpler and faster.
evoskuil02:24
Yesterday I took a short detour to implement the longstanding objective of chain "milestones" (avoiding another mixed metaphor, as a checkpoints and a milestones are on roads - though not "chains" mind you), as well as minimum chain work.
Since milestones exist to mark a known place on the road, but not force you through it (unlike a checkpoint) they are just perf optimizations. They are only useful for headers first, and cannot optimize headers (though that is not in need of it). So once a header reaches that point the blocks under it do not require validation (presumption of previous verification by the node owner). This implies only one is necessary, since block download won't start anyway until headers are "current" (top is recent in time).
So when a strong header chain is both current and minimum work is satisfied, or a given header is a checkpoint or milestone, the header chain is written to disk as the candidate chain. This is the same for "initial/catch-up" and ongoing sync. And when a header passes through a milestone or checkpoint, all hash-corresponding blocks under it bypass validation.
evoskuil02:48
minimum chain work is fine as long as it's not configured by developers, but versions of bitcoind ship with preconfigured values. This could allow that configuration to reject the valid chain, resulting in a stall - a soft fork. The code doesn't determine these, it's done by developers. So this will remain configurable and should really default to top checkpoint work. In any case it's done.
It doesn't really solve low work DoS, it just prevents it from being written to disk. It can still blow up our header RAM cache (std::unordered_map). But a restart resolves that, and more can be done to manage that later.
(edited)

Thursday, February 29, 2024

evoskuil05:40
X (formerly Twitter)
😷💩 Here is where the “no strings attached” money for Core Devs come from. The Bitcoin Core ship is taking water fast. Fortunately there is a lifeboat called @BitcoinKnots. Easy switch already available for Parmanode @parman_the and @umbrel.
M
mariano17:10
@evoskuil vietnam ?!
👍🏻 1
Nice ... im at us now 🙂
👍🏻 1
evoskuil17:12
What do you work on?
M
mariano17:13
Now .. i;m working as a ciso ...
👍🏻 1
evoskuil17:15
And you wanna do code reviews for Libbitcoin?
M
mariano17:31
Let me return to buenos aires ... i can help you with test and automated code analysis if you want
🔥 2
evoskuil17:32
Awesome
M
mariano17:32
👍
evoskuil17:33
Team meeting at 4pm NYC time today
(edited)
M
mariano17:33
ok
evoskuil17:34
Check here for zoom link
M
mariano17:34
ok perfect
pmienk17:37
Topic: Dev Weekly Status Time: February 29, 2024 01:00pm Pacific Time (US and Canada) Join Zoom Meeting https://us05web.zoom.us/j/87666370902?pwd=bEZDUlJ0MGJ5V3dVMUhVdHl5QzdFdz09 Meeting ID: 876 6637 0902 Passcode: 85U0bF