Skip to content
jasonsopkoPublic

About

Every Bitcoin block graded for spam, and who mined it

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

119 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cesspool.lol

Every Bitcoin block since the fork at 961640, every transaction in it, graded for spam, with the pool that mined it and the filter that would have kept it out.

How it works

  • plumb-check/plumb_check_tests.cpp is built into test_bitcoin from a Plumb tree (plumb-check/build.sh). It runs the shipped policy code on each transaction three ways, each with that software's defaults: Bitcoin Core 31 (-corepolicy plus Core 30's legacy-sigop limit and multiple OP_RETURN outputs), stock Knots 29.5.1 (Plumb's three own filters off, -permitlnrevokeleaf=0 and -datacarriersize at Knots' 83; since 29.4.3 Knots carries the dead-branch, bare-envelope, unproven-key and BPUB rules itself) and Plumb (42 since plumb7), and reports every reason each one trips and the data bytes it counts. Both counts include the recount knots#470 adds after the policy script check, which credits a key only when a signature verified against it (in Plumb since plumb9, in Knots since 29.5.1). Plumb's also includes, since plumb12, the witness items no verified signature check used, past 42 bytes an input (plumb#8), which stock Knots 29.5.1 does not count; the engine runs the script check the way the node does to get those keys and signatures. Plumb's BPUB rule carries knots#525 since plumb16, which reads BPUB multisigs anywhere in a witness script and which Knots 29.5.1 does not have, so the Knots and Core counts take their BPUB bytes from a copy of Knots 29.5.1's own BPUBBytes in the engine. Remove the copy when the Knots release named here includes knots#525. For Plumb it also reports where the bytes sit, how much of each input's count is those witness items (data_uw), how many each of six data-counting rules adds (the count with that rule alone off), how many the recount adds (the count with it left out, against the count with -rejectunverifiedwitness off) and how many knots#525 adds (the count with Knots 29.5.1's BPUBBytes in its place), and, when Plumb's 42-byte limit changes its reasons, the reasons it gives at 83 (p83). Nothing reimplements a filter. The site shows the Knots and Plumb verdicts only: Bitcoin Core does not accept block 961640 or any block after it, so no Core node has these blocks.
  • cesspool/classify.py names the protocol and finds the kinds Plumb does not count yet (fake multisig keys), so a miss shows as a miss.
  • cesspool/miner.py names the pool with reorg-watch's own rules.
  • cesspool/site.py renders static pages and share images.
  • cesspool/found.py writes the indexes behind Your Blocks (/found/): pool names, coinbase tags and payout addresses to block heights, as static JSON under /d/ that site.js searches in the browser.
  • cesspool/address.py writes the index behind Address Lookup (/address/): each address to the sewage transactions that spent from it, paid it, or pointed runes or a Counterparty enhanced send at it, and in what role. It reads runestones and Counterparty enhanced sends to find which addresses they point tokens to.
  • cesspool/releases.tsv lists the Knots and Plumb releases that /monthly/ marks, each with GitHub's published_at. A release gets its line when it ships.
  • tools/update.py runs from cron each minute with --watch 57: it checks the node's tip every 2 seconds, and when the best block changes fetches new blocks over REST, reprocesses anything a reorg replaced, renders what changed. A share image is drawn again only when its SVG changed.

The payload is never displayed. Address Lookup shows which addresses a runestone or a Counterparty enhanced send points tokens to, and nothing else from them.

A --watch run keeps the code it started with until it ends, 57 seconds after it started or later if an update is still running then. After a code change, wait for it to end before counting on the new code: until then a build can write pages from the old code next to the new static files.

State

~/.cesspool/: raw/ gzipped REST blocks (about 340 kB each), blocks/ one record per block, index.json summaries, found.json each block's coinbase tag and paying outputs, address.json which blocks Address Lookup has indexed and where their rows went (delete it to rebuild every address file), og.json a hash of the SVG behind each share image (delete it while holding lock to draw them all again, as after a font or rsvg-convert change), bin/test_bitcoin-plumb.

Rebuild everything after a classifier change:

rm ~/.cesspool/blocks/*.json ~/.cesspool/index.json
tools/backfill.py 961640 <tip>
tools/update.py --out /var/www/cesspool.lol --all

Setup on node1: deploy/setup.sh.

License

MIT, see LICENSE. The pool naming loads reorg-watch.py from reorg-watch, also MIT. static/beh-discord.png is the Bitcoin Education Hub's Discord server icon; it is not mine and the license does not cover it.

About

Every Bitcoin block graded for spam, and who mined it

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages