Spiral Work-Log Q4 2023

Wednesday, January 31, 2024

This is a copy of the Q4 2023 work-log I sent to Spiral for my grant.

Disclaimer: Some information that is not (or not yet) meant to be published may have been redacted.

In Q4 of 2023 and January 2024, among other things, I’ve worked on my fork-observer, the miningpool-observer and the peer-observer tools. I’ve also maintained my bitcoin-data related repositories, worked on macOS and FreeBSD support for Bitcoin Core’s tracing framework, and build a tool to find non-standard transactions. I’ve written blog posts about CPU usage of Bitcoin Core peers, about OFAC sanctioned transactions missing from F2Pool blocks, and a post about non-standard transactions being mined.

In more detail in no particular order:

Bitcoin Core CPU timings per relay-type

There is an ongoing effort in Bitcoin Core to increase the number of outbound block-relay-only connections from 2 to 8 with the goal of helping against network partition attacks. However, first the number of inbound slots need to be raised to accommodate more block-relay-only connections. More inbound slots also means higher resource usage. I’ve focused on CPU usage of Bitcoin Core peers, while others looked at memory and bandwidth usage.

I developed a framework to measure per peer CPU usage on a busy mainnet node. By recording the time spent in the SendMessage() and ProcessMessage() functions, it can be estimated how expensive adding more outbound and inbound block-relay-only connections are. As expected, block-relay-only connections are quite cheap. Full results can be found in https://delvingbitcoin.org/t/cpu-usage-of-peers/196/2, and I also left some commentary on the PR approach, which ended up allowing the authors to improve the approach.

fork-observer

When forks, or invalid blocks on the Bitcoin network happen, it’s important to know the involved parties. My fork.observer tool now tries to identify the miner, where possible. This also supports blocks on the default Signet.

Along with general maintenance, I’ve also added a feature that produces an RSS feed for invalid blocks because we saw three of them in 2023.

miningpool-observer

As some mining pools started censoring Inscriptions, I’ve invested some time into being able to detect inscriptions with add: detect ordinal inscription reveals in inputs and added an inscription tag to inscription transactions missing from blocks.

Also, I found it was time to revisit the miningpool-observer transaction package building code. I changed it to closer match Bitcoin Core’s ancestor package building code. This allows for a much cleaner feerate distribution graph.

Mining pool identification data needed to be manually updated now and then. I’ve changed this to automatically update if possible, and otherwise to fall back to older pool identification data. This means less ongoing maintenance work for me.

My mining-pool observer project also found six OFAC-sanctioned transactions missing from blocks. I’ve analyzed them and found that four of these were likely filtered by F2Pool. I’ve published a blog post about this, which was well received. F2Pool admitted the filtering and claimed they’d stop censoring.

peer-observer

I’ve got a request to check my mempool data to see if I’ve seen similar spikes in vByte/second being broadcast on the Bitcoin network as mempool.space did in September 2023. None of my nodes saw these spikes. However, it prompted me to add monitoring for it to my p2p monitoring nodes.

bitcoin-data

My call for more block-arrival timestamp data was mentioned in a Bitcoin Optech newsletter, and I received a few contributions adding more and older timestamps. I’ve also updated the stale-block dataset. Along with the work on improving miner detection in fork-observer and miningpool-observer, I’ve also been updating the mining-pools dataset, adding four new pools.

Bitcoin Core tracing support for macOS and FreeBSD

The current Bitcoin Core tracing framework only supports Linux. I’ve revisited this and found a way of extending this framework to macOS and FreeBSD without requiring new dependencies or similar. I’ve bought an old Mac mini to test this and have a branch where tracing on macOS is working. FreeBSD still needs more work. I plan to PR this against Bitcoin Core soon.

find-non-standard-transactions

I’ve got a request about non-standard transactions and MEV on Bitcoin. I had previously thought about a tool to find non-standard transactions being mined and took a shot at implementing a quick and dirty tool https://github.com/0xB10C/find-non-standard-tx. I’ve used this to check the last 100k blocks and wrote a blog post about it.

Miscellaneous



My open-source work is currently funded by an OpenSats LTS grant. You can learn more about my funding and how to support my work on my funding page.

Creative Commons License Text and images on this page are licensed under the Creative Commons Attribution-ShareAlike 4.0 International License

Next

Image for Long-Term-Support Grant from OpenSats for 2024 and 2025

February 1, 2024

Long-Term-Support Grant from OpenSats for 2024 and 2025

OpenSats supported my work on Bitcoin in 2024 and 2025 with a Long-Term-Support grant.

Previous

Image for Spiral Work-Log Q3 2023

October 16, 2023

Spiral Work-Log Q3 2023

This is a copy of the Q3 2023 work-log I sent to Spiral for my grant.