Monitoring Bitcoin mining pool

transaction selection

Can we detect transaction censorship by mining pools?


0xB10C
Bitcoin Developer
supported by a brink.dev grant

MIT Bitcoin Expo 2022


Marathon Digital Holdings press release from March 30th, 2021
https://ir.marathondh.com/news-events/press-releases/detail/1233/correction-marathon-digital-holdings-to-launch-the-first

Censorship Resistance of Bitcoin


    No one should be able to
  • prevent others from interacting with the Bitcoin network
  • indefinitely* block a valid transaction from being confirmed

  • * mining pools can freely choose not to confirm a transaction
  • * transactions paying a competitive fee should confirm eventually


Can we detect transaction censorship by mining pools?

Pooled Bitcoin Mining: Stratum V1

mining jobs contain the information needed to construct a block header

  • metadata: job id, clean jobs flag
  • block version, bits, time
  • previous block hash
  • coinbase transaction in two parts
  • branches of the transaction merkle tree

Miners don't know which transactions they are mining


Marathon Digital Holdings press release from May 5th, 2021
https://ir.marathondh.com/news-events/press-releases/detail/1239/marathon-digital-holdings-becomes-the-first-north-american

https://mempool.space/block/000000000000000000003f8cb66fe1ecfb38754abc9c4d4a62b71de45fef8777

miningpool-observer

Transparency for Mining Pool Transaction Selection


source on github.com/0xB10C/miningpool-observer
live on miningpool.observer

Comparing templates and blocks

First MARA Pool block on miningpool-observer

3 mBTC ≈ 120 USD @ $40k USD/BTC
https://miningpool.observer/template-and-block/000000000000000000003f8cb66fe1ecfb38754abc9c4d4a62b71de45fef8777
https://miningpool.observer/template-and-block/000000000000000000003f8cb66fe1ecfb38754abc9c4d4a62b71de45fef8777

Mining Pool Transaction Selection Observations


transactions missing from multiple blocks

conflicts between blocks and templates

extra transactions included by pools
Why are transactions sometimes missing from blocks?
  • transaction not propagated well enough yet
  • other transactions were prioritzed
  • conflicts with other transactions
  • transaction was filtered

Missing P2TR spends

miningpool.observer/missing/3d1e1215d126d9674ca3351092709ea63663eeea56c175cc7123b64a68a27a41

Missing Counterparty transactions

Mulitple missing Counterparty transactions from F2Pool's and ViaBTC's blocks

Missing transaction due to conflict (UTXO spend twice)

Conflict on UTXO belonging to this address

1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T

brain wallet (private key) for this address

"correct horse battery staple"

Low feerate version of conflict is mined (UTXO spend twice)

Block mined by Foundry USA https://miningpool.observer/conflicting/00000000000000000004ff584d9c2862fbc13cca3900dddcfe7395822477cb84

Replace-by-Fee causing conflict

2 sat/vbyte are added to stacks.co blockcommit-transactions every minute via a fee-bump https://miningpool.observer/conflicting/00000000000000000001a22d4174f7fd50a67fbc263548de51f87d87a92a1732
Why do pools sometimes include extra transactions in blocks?
  • privately transmitted to the miner
  • prioritized via out-of-band fee payment
  • transaction did not propagated yet

not-broadcast transactions (zero-fee)

Block 715489 by F2Pool includes two zero-fee transactions.

A pool UTXO consolidation and a pool payout transaction.
https://miningpool.observer/template-and-block/00000000000000000002f62770dae04d5e0f911ca2bf3319cedbec0cd6fcaa46

Out-of-band fees (ViaBTC)

https://miningpool.observer/template-and-block/0000000000000000000734cc3c9b1f642388d099ec63d6abbaba616fe5800260
Marathon Digital Holdings press release from May 31th, 2021
https://ir.marathondh.com/news-events/press-releases/detail/1244/marathon-signals-for-taproot

Can we detect censorship by mining pools?

When done at scale, yes.

Do we have evidence for censorship by mining pools?

No, not to the best of our knowlege.

How to avoid transaction censorship moving forward?

Adopt Stratum V2 and it's Job Negotiation Protocol as industry standard.

github.com/0xB10C/miningpool-observer
miningpool.observer
b10c.me/talks
@0xB10C