Avatar
b10c
b10c0000079a83cf26815dc7538818d8d56a2983e374e30a4143e50060978457
Bitcoin developer and observer

Hey nostr:npub1jy2pa43vcr3jkwny2f9edsx0cdavzkcwqcla4qqyf03y66nxlgrq3m9p6d - I wanted to have a look at your Bitcoin Node census data, but the site seems to be down. Is this related to cloudflare?

https://census.yonson.dev

I've written a bit about a project I've been working on for a while:

peer-observer: A tool and infrastructure for monitoring the Bitcoin P2P network for attacks and anomalies

https://b10c.me/projects/024-peer-observer/

I have too many other projects currently, but I think this could be a fun side-project for someone:

Can we spot public spy-Electrum servers run by Chainanalysis?

https://github.com/0xB10C/project-ideas/issues/11

Replying to Avatar jungly

We have a new stratum server implementation in Rust over at P2Poolv2. Here's why:

1. CKPool is great, but it's complicated and it's written in C.. It is very hard to extend or change. I tried as part of hydrapool effort for 256 Foundation telehash. We ran into issues at load with our changes. Enough to tell me, we need something easier to maintain and extend.

2. C doesn't make it easy to use async programming model where a core is freed while a thread waits for IO. You can do it, but the code gets complicated quick. We wanted to use modern tools like Rust's async/await so we can maintain and extend the server in future.

3. DATUM is again in C. On top of that it's tied to Ocean's model of block template protocols that we don't need in hydrapool or P2Poolv2. Messing with C or to forking the project wasn't a road we wanted to go down on.

4. SV2. This was the closest to our plans and we first tried to use the SV1 components for our user case. However, the code base was more complicated than we expected. There's good reasons for it, SV2 is opinionated to serve the SV2 model and it kind of created issues for us as we wanted to just use the SV1 parts of it. nostr:npub1rqx9zlmy7k2mre2t6t880rxv9fttzyl95jc5ym2tpfpepqcppkcs3ss548 and @gitgabe helped a lot, but in the end I took the opportunity to just dive in and write our own.

## So where are we now?

We have the server working. It replicates the CKPool behaviour as closely as possible. We have tested with cpuminer and bitaxes.

## Next steps:

We are running some load tests to compare our implementation to CKPool. Results coming soon.

We need to test our implementation with variety of firmware.

## How can you help?

You can help us test by pointing a machine for 5 minutes. That's all we need. We'll log the interaction and if there's any failures we can fix it using the logs. We will set something up soon and invite testers.

BTW, initial load tests are showing we are competitive with CKPool. Rust can be fast! πŸš€πŸš€

The repo is here: https://github.com/pool2win/p2pool-v2/

Stratum server is under the startum crate.

Just want to add that building stratum server has directly informed how we want to disseminate block templates and shares on P2Poolv2. That's another post though.

Where do I sign up?

I've persistent my notes on the May 2023 Bitcoin Core node DoS problems. These are background information for the disclosure from last year.

When non-ideal sorting, mass BRC-20 mints, and spy nodes caused a CPU Denial-of-Service on the Bitcoin network:

https://b10c.me/observations/15-inv-to-send-queue/?n

Replying to Avatar jb55

I am working on a new tool for bitcoin nodes, based on nostr:npub1kyxqqqq8n2pu7f5pthr48zqcmr2k52vrud6wxzjpg0jsqcyhs3tshfc6vv 's https://github.com/0xB10C/peer-observer work... I am forking it to create something a bit more hacker-friendly.

Introducing #bitcointap: a quick and easy way to tap into any bitcoin core node and extract traces in realtime

https://github.com/jb55/bitcointap

nostr:npub1kyxqqqq8n2pu7f5pthr48zqcmr2k52vrud6wxzjpg0jsqcyhs3tshfc6vv has done most of the hard work here. I am just making his tool a bit more unixy.

πŸ€™

In the current Bitcoin mining landscape with proxy lools like AntPool & friends, 6 mining pools produce and mine more than 95% of the block templates.

Bitcoin mining is highly centralized today.

https://b10c.me/blog/015-bitcoin-mining-centralization

In the current Bitcoin mining landscape with proxy lools like AntPool & friends, 6 mining pools produce and mine more than 95% of the block templates.

Bitcoin mining is highly centralized today.

https://b10c.me/blog/015-bitcoin-mining-centralization

I had a closer look at 15 OFAC-sanctioned transactions recently reported as missing by my miningpool-observer. While all transactions were picked up in the following blocks, it seems like F2Pool started to filter them (again).

https://b10c.me/observations/13-missing-sanctioned-transactions-2024-12/

Foundry won against AntPool's competing block by switching to their own block

https://x.com/0xB10C/status/1803082081385246738

Nothing crazy, just interesting to see this playing out.

Who mined on which previous block during the fork at height 845626?

https://x.com/0xB10C/status/1780611768081121700

Looking at the merkle branches that mining pools send to miners as part of stratum jobs, it's clear that the BTCcom pool, Binance pool, Poolin, EMCD, Rawpool, and possibly Braiins* have exactly the same template and custom transaction prioritization as AntPool.

Stratum v1 jobs include (parts of) the coinbase transaction and the merkle branches a miner needs to compute the merkle root. If all branches are equal across pools, the block template is exactly the same.

This is a smaller merkle-tree with the stratum job branches highlighted.

Here, branch0 is the txid of the first transaction in the block after the coinbase.

In the AntPool/Binance/BTCcom/.. template, it's a manually prioritized transaction paying 9.03 sat/vbyte https://mempool.space/tx/c938e8027a7fba782a092695a53d37654021bf20df71ca91b4a6daa9198b0c73

Many of the other pools didn't prioritize a transaction and included the highest feerate transaction https://mempool.space/tx/96608dc747677d6dfbc3a2b37f8a0146abae132799b13c130066bd3716fdf91a paying 301 sat/vbyte. ViaBTC prioritized another transaction and has a vastly different template.

This indicates that F2Pool currently is not using the AntPool templates, even if they share the the same custody provider. We know from multiple occasions that F2Pool has been building their own templates (https://b10c.me/o11, https://b10c.me/o9, https://b10c.me/o8)

Note that SigmaPool and SecPool both seem to share the same template (distinct from AntPools template). Two names, but probably one pool.

Some overlap in the first branches of distinct pools is expected as these branches consist of few (usually high feerate) transactions. For example, Ocean's "default" and "core" templates overlap up to branch3. At least the first 15 tx (2⁴ - 1) in the template are equal.

* similar to EMCD in the picture, Braiins sometimes differs from AntPool in the later branches of the template. This could indicate they're only helping with AntPools transaction accelerator and directly syncing with AntPools mempool, causing occasional differences in templates.

I've heard speculation about this all being liked to an FPPS partnership with AntPool/Bitmain.

Bitmain insures against bad pool luck but you have to use Bitmains templates/transaction prioritization and pay the mining reward to the insurer for later distribution.

Essentially a pool of pools and a lot of mining centralization.