The recent discussion about some politicians wanting to introduce KYC/AML requirements for miners (which I of course do hope will never come, in no country of the world) brought me to think about the censorship problem, i.e. the dangers of miners blacklisting certain UTXOs or addresses.
Currently, Bitcoin's censorship resistance is based purely on incentives. A miner can include or censor the transactions he wants to, but if he doesn't chose those with most fees included, he will make less profit. And if a transaction gets rejected but pays significantly more fees than the current lower bound to be included, it is likely that another miner will include it in one of the next blocks.
Now: What if e.g. 99% of miners blacklist an address or UTXO, would the current system be enough? Would there be a way to improve that, introducing new protocol rules?
I have basic understanding of computing and blockchain tech but not advanced enough to know if an improvement is principally impossible or if there only hasn't been enough research on this.
If there was research, even the goal it was deemed impossible, I would be grateful for links, possible BIPs, mailinglist discussions etc.
As a layman one could imagine, for example, a mechanism where signatures of transaction data by potential miners are collected before the "real" inclusion of the block. (Edit: I clarify here that this is not a serious proposal but only an example where an idea for an approach could be starting.)
The example I had in mind: Miners could publicly first sign all transactions to acknowledge they have received them. Three new rules are introduced for tx inclusions in blocks:
1) They can only include transactions which they have publicly signed before.
2) They cannot include any transaction which has a lower fee than another transaction they didn't include but have previously signed.
3) Any node ("challenger") can challenge a recent block proving that the miner hasn't followed rule 1 or 2, and if he can prove it, then the "challenger" node gets the block reward and fees (this would need major protocol changes, but should be possible as similar mechanisms exist in "slashing" PoS protocols).
This is in the end also a "financial incentive" to not censor, but it should be much stronger than the current mechanism as an entire block reward + fee would be in danger for the censoring miner.
The problem is, obviously, "where and how do the miners exactly publicly sign the transactions"? There would have to be a "global state" of all these signatures.
If they have to sign the complete transaction data on-chain (i.e. as an "attachment" to an earlier block, which later could be pruned), then they could censor transactions in this step based on blacklisted UTXOs, like they would when they decide which transaction they include in a block. Probably nothing would have been won, although I could imagine situations where a "cartel" censoring transactions could have to be bigger with such an approach if two different miners have to intervene in a "approval" of a transaction.
Where my doubt is if there is a way to make them sign only the TXID or incomplete transaction data without the identification of UTXOs, without possible "challengers" being able to game the system, never transmitting the complete data to the miners. Is this perhaps possible with zero-knowledge approaches? Or could there be a second step, i.e. once the challenger has proven a miner has violated the rules, the miner gets some kind of second chance (as then the transaction data would be publicly known due to the challenger)?
The problem you describe is called censorship resistance, and it is a key feature of Bitcoin and other decentralized cryptocurrencies. Censorship resistance means that no single entity, such as a government or a group of miners, can censor transactions or block certain addresses or UTXOs from participating in the network.
Currently, Bitcoin's censorship resistance relies on economic incentives, as you correctly noted. Miners are incentivized to include transactions with higher fees, as they earn more money that way. However, in the hypothetical scenario where 99% of miners blacklist an address or UTXO, this could lead to a situation where the economic incentives are not strong enough to prevent censorship.
To address this problem, some researchers have proposed new mechanisms that could improve censorship resistance in Bitcoin. One such proposal is called "Erlay," which was introduced in a research paper by Blockstream researchers in 2019.
Erlay is a new transaction relay protocol that reduces the bandwidth needed to propagate transactions across the network. One of the benefits of Erlay is that it makes it harder for an attacker to censor transactions, as transactions are broadcasted to a smaller subset of nodes. This makes it more difficult for an attacker to isolate and censor specific transactions.
Another proposal is called "Dandelion," which was introduced in a research paper by a group of researchers from several universities in 2018. Dandelion is a privacy-enhancing protocol that obfuscates the origin of transactions. This makes it more difficult for an attacker to identify and censor transactions that originate from specific addresses or UTXOs.
There are also ongoing discussions and research into new mechanisms to improve censorship resistance in Bitcoin, including proposals for more sophisticated incentive mechanisms and mechanisms that make it more difficult for miners to collude and censor transactions.
It is important to note that these proposals are still in the research stage, and it is unclear whether or when they will be implemented in Bitcoin or other cryptocurrencies. However, the fact that researchers are actively exploring new mechanisms to improve censorship resistance is a positive sign for the future of decentralized cryptocurrencies.