OpenSats Work-Log 2
Wednesday, July 31, 2024This is a copy of the 2nd work-log I sent to OpenSats for my LTS grant.
Disclaimer: Some information that is not (or not yet) meant to be published may have been redacted.How did you spend your time?
Publications
- I’ve been looking at mining pool behavior during forks while building out the stratum-observer stratum job collecting (see below). I regularly covered forks on mainnet with tweets (such as these 1, 2, and 3) and then ended up publishing a short-form explainer video and a blog post on Mining Pool Behavior during Forks.
- I’ve looked into compact-block reconstructions on mainnet after another bitcoiner reached out asking for stats on them. I noticed that, since most miners have switched to -mempoolfullrbf=1 by default, enabling full-RBF in Bitcoin Core by default would help block propagation. I commented on this on the current “enable full-RBF by default” Bitcoin Core pull request.
- I posted an extended version of the compact-block reconstruction stats on delving-bitcoin.
Projects
peer-observer & infrastructure
To monitor for Bitcoin P2P anomalies and attacks, I run 11 Bitcoin Core “honeynodes” (honeypot nodes) on four continents across three different hosting providers. All nodes have additional monitoring attached that is used to record data and metrics. As leaking the node IP addresses would defeat the purpose of the honeypot, the public interface https://public.peer.observer/ is redacted. I’ve been providing access to interested and trusted developers and community members on an ad-hoc basis.
Over the past months, I’ve been mentoring a Summer of Bitcoin mentee as he has been working on some of the initial anomaly detection and alerting setup. I’ve also been supporting him in his journey learning Rust and more about Bitcoin and Bitcoin Core internals.
Other things include:
- On going maintenance of the nodes and infrastructure. For example, coordinating with the MIT DCI to increase disk size on one of the nodes, or setting up new ARM instances with more CPU and disk IO compared to the previous instances.
- I build a tool that converts the peer-observer events (e.g. nodes connecting and disconnecting, P2P messages being send and received) to messages published on a websocket. This allows for realtime visualizatioins such as https://x.com/0xB10C/status/1797904155593548273
- Working with my mentee, we noticed a few bugs setting his infrastructure up. For example, https://github.com/0xB10C/peer-observer/pull/22, which we fixed together
- Build out further dashboards
- Set up a Bitcoin Core v0.21.1 node to monitor eventual exploitation of Bitcoin Core :: Disclosure of remote crash due to addr message spam
stratum-observer (step 1)
Following my tweet about Antpool proxy pools, I started to build out proper tooling to observe stratum jobs by mining pools. In the past months, I primarily worked on step 1, which is support for stratum v1, a simple and WIP website showing stratum-job updates in real-time and collecting data on stratum jobs into a database for later analysis.
As other realtime monitoring solutions have popped up (e.g. stratum.work), I’ve decided to hold off on publishing my WIP website until it’s in better shape. The plan for step 2 is to build out support for stratum v2 and to expose more metrics and information on the frontend.
transactionfee-info
REDACTED
I picked up work on a new open-source Rust backend for transactionfee.info. The old Go backend (see transactionfee.info (2020 version)) is closed source and I’m not planning to maintain it any further. Over the last weeks, I tried to bring the new backend closer to being ready to replace the old backend. This will also allow interested contributors to contribute new charts and new metrics.
Bitcoin Core
- Over the last few months, the Bitcoin Core guix.sigs repsoistory, containing signatures for release builds from developers, had problems with mismatching build hashes. These were only detected after being merged and used together with a release. I had build a CI job that reports mismatches, however, it turned out that getting the CI to comment on a PR was harder as initially thought. Together with willcl-ark, we fixed the automated GitHub action to comment a SHASUM summary on PRs as soon as they are opened.
- I’ve been keeping my currently open PRs rebased and ready for review.
misc
- I reworked the fork-observer front-end animations for new blocks and forks in https://github.com/0xB10C/fork-observer/pull/41
- I’ve been keeping my collection of Nix modules and packages for software I’ve written up-to-date. I use this for my own setups. I started adding test for newly added packages and hope to add more tests for the older packages soon.
- I’ve been reviewing nixpkgs PRs for Bitcoin related software - e.g. https://github.com/NixOS/nixpkgs/pull/322524
Plans for Next Quarter?
- start to work on stratum-observer step 2
- continue working with my Summer of Bitcoin mentee on peer-observer alerts and anomaly detection
- continue to work on the projects mentioned above
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.
Text and images on this page are licensed under the Creative Commons Attribution-ShareAlike 4.0 International License