Inside your Bitcoin node there are two wolves

One of them is the consensus rules about what makes it into the blockchain. The other one is your mempool policy about what makes it into the blockchain.
The wolves are not the same. Which one is Bitcoin?

Consensus Rules: The Day Wolf

Consensus is a good wolf. It may be savage, but it only kills and eats transactions that don't follow consensus rules.
Every transaction included in the Bitcoin blockchain follows a set of rules that make up what we call Bitcoin. If you run a node and you have an up-to-date copy of the Bitcoin blockchain your node agrees with all the other nodes about the rules transactions must follow. This is consensus.
There are a lot of consensus rules. People like to argue about them. Disagreements lead to forks and forks are scary, so everybody pays attention to the Day Wolf. It's a big hulking animal that's impossible to ignore.

Mempool Policy: The Wolf of the Night

Mempool policy is a mysterious wolf. A lot of Bitcoiners don't even know it exists, don't even know the difference between a mempool running on their node and mempool.space. Not too many people notice how the Night Wolf1 feels about things.
Unless you send your transactions directly to a miner, you are probably relying on a transaction relay network created by Bitcoin nodes all around the world. If you are running a Bitcoin node with a mempool, odds are you are participating in this transaction relay network.
Nodes make connections to other nodes and a lot of smart people have figured out how to make sure that when a new block gets mined, your node has already heard about almost all the transactions it contains. Your node doesn't have to start downloading and verifying like mad when a new block shows up because it has a mempool where it keeps unconfirmed transactions it's heard about, just waiting for them to show up in a block.
In many ways, the Night Wolf is the Day Wolf's younger brother: the Day Wolf is in charge and the Night Wolf can't do something the Day Wolf doesn't agree with. Your mempool isn't going to let in any transactions that violate consensus rules.
But does the Night Wolf have to let in every valid transaction it hears about?

When the Night Wolf growls

Maybe you've heard a little bit about the debate around ordinals and filtering and spam and so on.2 This is a debate about the Night Wolf.
You see, it turns out that some people don't like that other people are broadcasting transactions full of crappy random data (like pixel pictures of rocks) and they want to use their mempool policy to make such transactions harder to get into the blockchain.
So here's what they do: they go beat the Night Wolf and tell him that he has to slaughter any transaction he comes across that meets their criteria of what should be excluded.
They change the policy rules of their mempools to exclude transactions that are consensus-valid but, for example, that have more than a certain amount of data in the OP_RETURN.
The Night Wolf in their node dutifully becomes a wild-eyed killer.

The Night Wolf has always been a killer

He's a wolf, people. He kills things. That's what wolves do.
Mempool policy has always3 been more restrictive than consensus rules.
It turns out there are already a host of mempool policies that let the Night Wolf slaughter consensus valid transactions so that they never move beyond his mempool. Here's just a few examples of valid kinds of transactions the average Night Wolf refuses to relay:
  • transactions that are big
  • transactions with a ton of signatures might
  • transactions with an nVersion that isn't 1 or 2
  • transactions that are worth less than it costs to get them mined
  • transactions that are bare multisigs
So what's the big problem with letting people add a few more policies to their mempool and make their Night Wolf especially mean and nasty?

The Day Wolf is stronger than the Night Wolf.

If a transaction is not valid by consensus rules it won't make it into a block. That's Bitcoin.
Bitcoin is able to do this thing we call soft-forking because of this fact. A hard fork is when you change the consensus rules so that the Day Wolf has to spare transactions he used to kill. A soft fork is when the you make the consensus rules more specific so that the Day Wolf can still kill all the transactions he used to kill, but now he gets to kill some new ones.4
So the Day Wolf--consensus rules--controls what the blockchain is and this is as it should be.
The Night Wolf can't make the Day Wolf change his mind. But can the Night Wolf cause a soft fork by killing certain kinds of transactions before they get to the Day Wolf? Could you use mempool policy to mimic the effect of a soft fork?
The answer is no. No matter how strict you make mempool policy, as long as a small percentage (I've read some things that say 2 or 3 %, while others say more like 30%) of nodes are still relaying transactions you don't like (and are consensus valid), such transactions will make it into blocks. And once they are in blocks, the Night Wolf is powerless.
But what if all the nodes give in and embrace their own inner Night Wolves?

People start emailing the Day Wolf

If there are people who want to spend money to get consensus-valid transactions into the blockchain, there will be miners who want to earn that money. That's what the business is.
As of March 2024, there are at least 5 publicly available transaction accelerators run by mining pools (AntPool, F2Pool, ViaBTC, Binance, Mara).
Transaction accelerators are generally seen as a bad thing for Bitcoin because they might lead to centralization. When some miners see transactions that the rest of the miners don't know about, they might get an edge. And miners with an edge quickly become miners with more hashpower. Now we have to deal with a new animal: centralization.
Centralization is like a big evil bear that wants to come eat up both wolves and all the nice little lemmings that play with them (that's you and me).

Why not just let the two wolves become one? (Relay all valid transactions?)

Since we don't want to get eaten by the evil bear of centralization, why don't we just make sure that mempools will accept every consensus-valid transaction? If we did that, nobody gets an edge, transaction accelerators return to just being a tool for people who don't know how to use CPFP and RBF and we end up with just one wolf.
@benthecarman wrote a Bitcoin Core PR back in May 2023 to allow nodes to reduce some of the major differences between the wolves and the discussion around it is a pretty quick primer on what's at stake.

Inside Bitcoin culture there are two wolves

Bitcoin achieves an incredible thing: it manages ensure that a utxo created in 2009 with who knows what kind of weird experimental script thingie (because it was all a weird experimental thingie back then) can still be spent today despite all the many clarifications that have been made to the consensus rules.
But this means the Day Wolf can go berzerk. He still needs more training. And the Night Wolf can help with that.
EXAMPLE:
Pre segwit transactions can be made in such a way as to put a huge validation burden on nodes (quadratic hashing problem). The consensus rules haven't changed to prevent this because it could potentially make some valid utxos impossible to spend. A number of mempool policies exist to reduce the risk that such transactions will propagate through the network.
Additionally: Bitcoin is a live network, securing hundreds of billions of dollars of value and we still make changes to the rules without anyone actually being in control of it.
EXAMPLE:
All transactions have a nVersion field. After segwit, this field has been reserved to facilitate future upgrades. The Night Wolf crunches up any transaction that has anything other than 1 or 2 in its nVersion to preserve this ability. Eventually, we want to be able to "turn on" some functionality by putting a 3 or a 4 there, but it needs to be held blank until we all agree on what that functionality is going to be.
The two wolves exist pretty much because Satoshi made mistakes in its early days and wrote consensus rules that allowed dangerous transactions or didn't anticipate the ways in which the project would grow. Bitcoin culture refuses fix the problem by changing the consensus rules if it results in making it impossible for someone to spend their money or if it means an increase in centralization.

The Moral of the story5

It's okay for mempool policy to be more restrictive than Bitcoin's consensus rules, but it should be as close as possible and anytime miners are mining lots of transactions that most mempools reject, it's probably time to reevaluate.
Network behavior is one of the few bits of friction driving good technical design rather than "move fast, break things, and force everyone else onto my way of doing thing rather than discussing the design in public" --gmax, 2015
In wolf terms this means: the Night Wolf can get big and ferocious, but he needs to always remember that he isn't as strong as his older brother.
If you want to learn more about this, you should read Gloria Zhao and Murch's Waiting for Confirmation to get started down the rabbit hole.6

Footnotes

  1. The Night Wolf is a better name for the mempool.
  2. There's been so much conversation about filtering and spam that I decided it's time we had some new metaphors to expand the semantic turf this conversation inhabits. Therefore, you are all going to get spirit animals.
  3. I'm not actually sure if mempool policy was more restrictive than consensus rules in early versions of bitcoin, but it has been since at least segwit.
  4. Here's an easy way to remember the difference: hard fork = nicer wolf; soft fork = meaner wolf. If you think I'm stretching this analogy way too far...just wait. I haven't even gotten started yet!
  5. I was going to write just a straightforward description of all this, but my cousin Mathilde is really into wolves and convinced me that it would make more sense if I used wolves to explain it. I listened to her because she's the only person who ever helped me to understand the Fed's Reverse Repo Facility and she speaks Latin.
  6. Maybe I should have made this whole thing a rabbit metaphor...
This is a great piece and props to your cousin convincing you to use wolves.
As a Mortal Kombat player, I keep picturing this guy, though: https://www.hlj.com/productimages/scc/scc95623_0.jpg
reply
Nightwolf wins!!!
reply
Next I will introduce flaming green weapons.
reply
203 sats \ 2 replies \ @oomahq 19 Mar
This article can be summarized as such: consensus rules prevent certain TXs from being included in mined blocks. Mempool policy rate limits certain types of consensus-valid but otherwise undesirable TXs. They shape in a loose way how people use Bitcoin, but doesn't stop anyone who's determined enough to get some non-std TX mined.
Sharing a recent study of non-standard transactions that found their way into the blockchain during the last year and a half. Of the total 269 million transactions that the Bitcoin network confirmed in that timeframe only 20k violated standard mempool policy. That comes at about 0.0074% of the total, or one non-std transaction every 6 blocks on average.
reply
That's a pretty good summary, but I think it needs more wolves or at least a hawk or something.
(Rate-limits is a nice way to put it, though)
reply
🐺🐺🦅
reply
Thank you for this great write-up. It does an awesome job of breaking down the crux of the problem and making it accessible to anyone.
A couple minor nits:
• transactions that are worth less than it costs to get them mined • transactions that are bare multisigs
  1. I assume that you mean the rule that makes transactions with dust outputs non-standard, but it could be understood to refer to transactions whose outputs are worth less than the transaction fee, but the latter is permitted.
  2. Bare multisig inputs are strictly allowed, bare multisig output scripts with more than three public keys are non-standard by default. There is also a startup option -permitbaremultisig that’s enabled by default but can be used to disable relay of all bare multisig outputs.
reply
Thanks for the clarifications! I need to be more careful with my input output wording.
I'm glad you thought it was an accessible explanation if things. I've been slowly trying to wrap my head around the larger conversation and writing this helped me coalesce things.
reply
The animal duality in this metaphor calls to mind Plato's charioteer, in chapter 6 of The Republic, who drives a white horse and a dark horse.
The white horse symbolizes the noble and virtuous aspects of the soul, associated with reason and intellect. This horse represents the disciplined and controlled parts of human nature.
Conversely, the dark horse symbolizes the base and irrational aspects of the soul, driven by desires and appetites. This horse represents the untamed and passionate aspects of human nature, often leading to impulsive and reckless behavior.
And in the metaphor, the charioteer himself represents the rational part of the soul, guiding and directing the chariot.
reply
Well, perhaps I should have switched the roles of the Day Wolf and the Night Wolf, because if anything is untamed and irrational, it is the consensus rules.
reply
Great articles like this deserve impressive titles, and you delivered.
reply
reply
Is this AI or a mid photoshop job 😂
i guess the later since sharpness depth doesnt make sense lol
reply