Bitcoin Forum
October 28, 2025, 04:53:27 AM *
News: Pumpkin carving contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How filters actually work!!  (Read 10 times)
PepeLapiu (OP)
Member
**
Online Online

Activity: 123
Merit: 64


View Profile
Today at 04:14:21 AM
 #1

So there is a debate going on right now, which is pretty much centered around filters. Some say that filters don't work, or that they constitute a form of censorship, or that they will eventually devolve into censorship.

But nobody actually explains what filters actually work. I'm going to do just that now. And it's going to ruffle a few feathers. Expect a few people to come on here and call me an idiot, a spammer, a Nazi, and so on.....

Never the less, here is how filters actually work. And for reference, I will explain how the op_return filter at the base of this debate, actually works.

So you run a node. Your node receives transactions from wallets connected to your node, as well as from other nodes relaying transactions to you.

Your node verifies that those transactions are consensus valid (aka you own the coin you send, and you are not doing a double spend). And your node also runs several filters, one of which is the op_return filter.

If the transaction checks out, it's added to your mempool, and it's relayed to other nodes so they can in turn very it.

If the transaction fails the two steps, for example an op_return with 100 bytes of data, it is simply forgotten about and dropped on the floor. It's not added to your mempool, and it's not relayed to other nodes.

It's important to understand your node does not ban or censor transactions. Your node only decide what it adds to it's own mempool, and what it relays to other nodes.

And the only goal of your mempool is to send a signal to the miners: "These are the transactions I have verified. Please put them in your next block."

The miners are not obligated to listen to your node, or to any other of the 25,000+ nodes on the network. They can put whatever they want in their blocks. They generally prefer to put in their block the transactions that pay the most in miner fees, as miners are profit driven.

Once a miner finds a block, he fills it with transactions from his mempool, and he propagates it to the rest of the network.

Your node receives this new block and you verify that all the transactions are valid. If the miner didn't include anything you filtered out, you likely have most of the transactions already verified in your mempool. So the verification process is really fast. You can add the block to your copy of the chain, and propagate the block to other nodes.

But if the miner put in stuff your node filtered out, you don't have that transaction in your mempool. You have to request it, download it, and verify it.

And you need to do that for every transaction you don't have in your mempool, all before you can add the block to your copy of the chain, and propagate the block to other nodes.

In other words, for a miner to include stuff you filtered out greatly reduces propagation speed of the block. And the miner risks losing his $350,000 block reward to an other miner who gets his block propagated faster than him.

Your filter is similar to a speed bump that pops up only for the miner who puts spam in his block. But if you are the oy one to run this filter, the speed bump will be more like a grain of rice. If enough nodes are applying the same filter, the speed bump becomes significant.

The miner will need to either run the same filter as the rest of us, or charge significantly more money to the spammer to compensate for the additional risk he is taking.

Just remember this when a core supporter tells you the spammer can bypass your filter and go directly to the miner. They are deliberately and conveniently leaving out the part of it where filters are incintivizing the miner to not accept spam.

And when the core supporters tell you filters are censorship, just remember thus speed bump analogy. Filters don't take anyone out of the race. Filters just make it more of a PITA for spammers and the miners who cater to spammers.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!