OpenSats Work-Log 1

AI Summary6 min read

TL;DR

This work-log details Bitcoin Core development activities including security vulnerability disclosures, monitoring tools like peer-observer honeynodes, and infrastructure improvements. It covers analysis of mining pool anomalies, Bitcoin Core contributions, and plans for stratum monitoring and anomaly detection.

Key Takeaways

  • Disclosed security vulnerabilities in ViaBTC's pool implementation and analyzed invalid blocks from F2Pool
  • Deployed 12 Bitcoin Core honeynodes across four continents for P2P anomaly monitoring through peer-observer project
  • Contributed to Bitcoin Core development including build system testing, GUIX builds, and attending CoreDev meetings
  • Identified multiple major mining pools sharing identical transaction templates and prioritization as AntPool
  • Plans include stratum job monitoring tool development and mentoring Summer of Bitcoin project on anomaly detection

This is a copy of the 1st 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

Projects

peer-observer & infrastructure

To monitor for Bitcoin P2P anomalies and attacks, I now run 12 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.

I’ll be mentoring someone as part of my Summer of Bitcoin project “peer-observer: Anomaly detection and alerting for Bitcoin Core P2P events”. The goal is to extend peer-observer with proper alerting and to experiment a bit with proper anomaly detection.

The infrastructure work for peer-observer includes (but not limited to):

  • Setting up four low powered ARM nodes in a new datacenter.
  • Decommissioning of two nodes used during early development in 2022 and 2023
  • Enabling detailed debug logging on the nodes and daily log rotation of debug.log files
  • Automated FTP backup of old debug.log files for future use
  • Use client certificate authentication instead of basic auth
  • Update nodes to Bitcoin Core 27.0rc1 release candidate as well as 26.1 and 25.2 release candidates
  • Rework Grafana dashboards and add a dashboard playlist for TV mode

fork-observer

After noticing and reporting an issue with a stuck btcd node connected to my fork-observer instance, I added an RSS feed for lagging nodes (to be able to easily alert on stuck nodes) and added an RSS feed for offline nodes. Also, exposed and started showing node implementation along with some general refactoring. For the halving stream, I added a fullscreen mode.

Bitcoin Core

  • I tested hebasto’s proposed Bitcoin Core build system change from CMake to autotools on NixOS: https://github.com/hebasto/bitcoin/issues/121
  • I opened PR #29636, #29877, #29549, have been keeping #26593 and #25832 up-to-date and 28998 was merged.
  • I’ve also been experimenting with a possible continuous benchmarking solution for the Bitcoin Core CI. See 27284.
  • I attended the CoreDev meeting in Berlin in early April and presented my peer-observer work. I also offered to help other developers with data/stats/insights for their proposals or PRs. This resulted in five developers reaching out during and after the event requesting data (mempool data, network-adjusted time data for 29623, benchmarking #29491, non-standard tx stats for the great consensus cleanup, orphan transaction stats and tooling, …).
  • GUIX builds and hash mismatch tooling: After submitting my reproducible GUIX build signatures for Bitcoin Core 25.2rc2, 27.0rc1, and 27.0 a binary hash-mismatch was noticed. This could be tracked down to me switching to a new build setup. As we don’t have any alerting for hash-mismatches, I PR’d a CI job that comments a summary of the hashes on each PR. The goal is to learn about future mismatches as early as possible to be able to investigate them.

misc

Plans for Next Quarter?

  • continue to work on the projects mentioned above
  • build out a stratum job monitoring tool to provide everyone access to the pool’s job information (inspired by https://twitter.com/0xB10C/status/1780611768081121700)
  • Start to work with my Summer of Bitcoin mentee on peer-observer alerts and anomaly detection

Visit Website