Replies (19)

JackTheMimic's avatar
JackTheMimic 1 week ago
How exactly would the condition arise where a core or knots node upgrades to BIP110 with the legacy chainstate then doesn't immediately have to reorg to the BIP110 valid chain? How is this any different than if I mine a block to my node, don't broadcast to any peers then reconnect a day later? Is that also a "consensus bug?" Or is it just reoganization?
Now this is prime example of nothingburger. By Bitcoin Mechanic >What should happen instead An enforcing client needs a reliable way to know whether its saved history was actually checked under the rules it now claims to enforce. If the client cannot prove that, it should refuse to start normally and require the operator to rebuild or redownload the affected history. That's a nice-to-have, but its absence does not constitute a "consensus bug". In reality Bitcoin nodes do not need to accommodate people trying to hot-swap clients with different consensus rules that just figure out how to become coherent again. `invalidateblock` exists and solves the problem already if someone ends up in this situation (albeit crudely). Also, arguably Bitcoin nodes shouldn't have logic added that constantly reevaluates already-accepted blocks for validity. That's an obvious trade off in that it could introduce instability for no good reason whatsoever. Mismatches in the code between versions might cause one version of Bitcoin Core to erase a bunch of blocks that are considered fine by an older version or vice versa. A BIP110 node is never going to be in this position because it's never going to temporarily be replaced by a non-enforcing node, accept a few blocks it shouldn't, then have their user switch it out for BIP110 again expecting it to just figure out what to do with the invalid blocks that were downloaded by a false Bitcoin node. tldr: I can install weird software that corrupts my blockchain directory. Is Bitcoin Core supposed to be something you can run that finds that directory and un-corrupts it automatically? It doesn't even reindex when there's a discrepancy, you have to manually tell it to do that. Same as invalidateblock. Shockingly low effort FUD here Mr "Dathon Pwn"
Well if you ask him. It’s not happening soooo he’s doing all this effort for our benefit.
sedited's avatar
sedited 1 week ago
I don't know, is it really a bug? If you want to change to a lower pow chain, run invalidateblock.
Sjors's avatar
Sjors 1 week ago
Missed opportunity to call this blockslopp
sedited's avatar
sedited 1 week ago
Sure, if you are going to publish a UASF client that activates on minority hash, this might be something nice to provide, but I don't think this is really a big deal. The goal of a UASF is to become the heaviest pow chain at the fork height, or very shortly thereafter. From their delusional perspective that seems coherent to me.
Maple AI: "More eyeballs might have caught it—especially if one of those eyeballs belonged to someone who had just spent a week thinking about startup verification and soft-fork upgrades. But the saying isn't wrong; it just describes shallow bugs. The BlockSlop gap is fundamentally a state-management and upgrade-path bug, and those tend to be deep. They require the right eyeballs, not just many of them."
Artel 21's avatar
Artel 21 1 week ago
BIP-110 is not ideal, will you support removing witness discount? It's robbing miners of 75% of their deserved fees. Or you enjoy the discount? Litmus test.
The discount exists to correct an imbalance between the cost of creating utxos and the cost of consuming utxos. Removing the discount would result in incentives that make it likely for the utxo set to grow even faster.
It's complicated. A transaction output: * is stored in the UTXO set until spent, * has to be maintained by validating nodes, * contributes to the state that nodes need for future validation. By contrast, when that output is eventually spent, much of the data required to authorize the spend—especially signatures—is transient validation data. Once the spend is confirmed, the old UTXO can be deleted from the UTXO set. So there is a desirable incentive structure: UTXO creation should be relatively expensive and UTXO consumption should be relatively cheap The witness discount moves Bitcoin in that direction. Example: P2WPKH A typical native SegWit P2WPKH input is roughly: * 41 non-witness bytes → 41 x 4 = 164 WU * about 107 witness bytes → 107 WU Total: 271 WU / 67.75 vbytes A P2WPKH output is 31 bytes, all non-witness: 31 x 4 = 124 WU = 31 vbytes So consuming a UTXO still costs more than creating one, but the difference is much smaller than it would be if the signature received no discount. Without the witness discount, that same input would be roughly: 41 + 107 = 148 bytes versus only 31 bytes for the newly created output. That would give users a fairly strong incentive to create lots of outputs because creation looks cheap, while later consolidation looks expensive. With the discount, the ratio is closer to 68 vB input : 31 vB output rather than 148 : 31. Why this matters for UTXO growth: Suppose you receive ten small payments. Later, you want to combine those ten UTXOs into one. A consolidation transaction has: * many inputs, which **destroy UTXOs** * few outputs, which **create UTXOs** Bitcoin arguably wants such transactions to be reasonably cheap because they reduce the global UTXO set. The witness discount helps enormously here because most of the bulky part of each input—the authorization data—is discounted. Conversely, a transaction with: * one input * twenty outputs creates nineteen additional UTXOs. Those twenty outputs receive **no witness discount**. Their bytes count at the full 4 WU/byte rate. So the weight system implicitly taxes UTXO proliferation more heavily than it otherwise would.
Well if consuming utxos is spending Bitcoin what is creating utxos? and how does segwit discount curb utxo set growth? and why is that a bad thing? I always thought segwit was a compromise intended to help scale Bitcoin which would grow the utxo set.
UTXO creation occurs when you deposit bitcoin in an address. Segwit does many things, the increased block weight limit does allow for more throughput. The discount is complicated and a rough estimation rather than precisely tuned for every script type.
Jameson Lopp's avatar Jameson Lopp
It's complicated. A transaction output: * is stored in the UTXO set until spent, * has to be maintained by validating nodes, * contributes to the state that nodes need for future validation. By contrast, when that output is eventually spent, much of the data required to authorize the spend—especially signatures—is transient validation data. Once the spend is confirmed, the old UTXO can be deleted from the UTXO set. So there is a desirable incentive structure: UTXO creation should be relatively expensive and UTXO consumption should be relatively cheap The witness discount moves Bitcoin in that direction. Example: P2WPKH A typical native SegWit P2WPKH input is roughly: * 41 non-witness bytes → 41 x 4 = 164 WU * about 107 witness bytes → 107 WU Total: 271 WU / 67.75 vbytes A P2WPKH output is 31 bytes, all non-witness: 31 x 4 = 124 WU = 31 vbytes So consuming a UTXO still costs more than creating one, but the difference is much smaller than it would be if the signature received no discount. Without the witness discount, that same input would be roughly: 41 + 107 = 148 bytes versus only 31 bytes for the newly created output. That would give users a fairly strong incentive to create lots of outputs because creation looks cheap, while later consolidation looks expensive. With the discount, the ratio is closer to 68 vB input : 31 vB output rather than 148 : 31. Why this matters for UTXO growth: Suppose you receive ten small payments. Later, you want to combine those ten UTXOs into one. A consolidation transaction has: * many inputs, which **destroy UTXOs** * few outputs, which **create UTXOs** Bitcoin arguably wants such transactions to be reasonably cheap because they reduce the global UTXO set. The witness discount helps enormously here because most of the bulky part of each input—the authorization data—is discounted. Conversely, a transaction with: * one input * twenty outputs creates nineteen additional UTXOs. Those twenty outputs receive **no witness discount**. Their bytes count at the full 4 WU/byte rate. So the weight system implicitly taxes UTXO proliferation more heavily than it otherwise would.
View quoted note →
Artel 21's avatar
Artel 21 4 days ago
I have a few reflections and curious to hear your take. 1. On "UTXO creation should be relatively expensive and UTXO consumption should be relatively cheap": The witness discount doesn't accomplish this. It makes witness bytes cheap in the fee market regardless of whether the transaction is creating UTXOs or consuming UTXOs. A transaction that creates 20 outputs from 1 input still gets the discount on its witness data. The discount isn't targeted at UTXO economics. It's a blanket subsidy on a byte type. 2. On "So consuming a UTXO still costs more than creating one, but the difference is much smaller": This isn't evidence the discount is working as intended. It's a side effect of blanket-witness-discounting. The discount doesn't distinguish between a consolidation transaction and an inscription. Both get the same discount on their witness data. The "desirable" asymmetry is accidental, not designed. 2. On "Without the witness discount, that same input would be roughly 148 bytes versus 31 bytes... That would give users a fairly strong incentive to create lots of outputs because creation looks cheap": This inverts the problem. Pre-SegWit, 148 bytes for an input vs 31 bytes for an output means spending was already more expensive than creating. But that reflects reality UTXOs are persistent state, signatures are not. The fee market should price bytes by their persistence cost. The pre-SegWit ratio already does that. The witness discount didn't fix an incentive problem. It introduced a pricing distortion. 3. On "With the discount, the ratio is closer to 68 vB input : 31 vB output": A witness byte costs a quarter of a non-witness byte in vbytes but the same in disk, in RAM, in bandwidth, and in validation. The discount is applied to the price signal. It is not applied to the object. 4. On "The witness discount helps enormously here because most of the bulky part of each input the authorization data is discounted": Correct. But "helps enormously" is doing a lot of work. The discount also helps enormously with inscription bloat. You're selecting the beneficial use case and ignoring the harmful one. The same mechanism that makes consolidation cheap makes it cheap to stuff data into the witness at a quarter of its persistence cost. 5. On "Those twenty outputs receive no witness discount... So the weight system implicitly taxes UTXO proliferation more heavily": Three problems. One - the outputs are non-witness data; they were always priced at 4 WU/byte, before and after SegWit. There's no "additional tax" from the discount. Outputs simply don't benefit from it. Two - you're ignoring that the discount also makes it cheap to create new witness data that persists on disk. An inscription with 1 input and 1 output benefits from the discount on its witness while adding permanent bytes to the chain. Three - the "implicit tax" framing assumes the goal is to discourage UTXO creation. But the real goal should be byte identity: every byte priced equally. The discount doesn't tax UTXOs - it subsidizes witness bytes, which happens to create a minor asymmetry between inputs and outputs. Happy to hear your take on my review! @Jack K @mleku Interested to hear your guys takes too.
Artel, I think you hit the nail on the head. It’s obvious the 4:1 witness discount is fundamentally arbitrary. I don’t see a physical justification for assigning permanently committed bits different economic weights with respect to the actual physical cost Bitcoin must bear. The cost of Bitcoin is ultimately paid in conserved energy and permanent memory, not in our software abstractions. This is the problem when our understanding of Bitcoin is not defined in the physics of work (joules) and memory (bits), but thru fiat interpretations. Bitcoin physically defines money with respect to energy, time and information (memory). Once you pull the logic to limit you realize that the second law of thermodynamics expressed in Bitcoin states that the 2.1 quadrillion satoshis will tend to disperse across an increasing number of UTXOs, unless there is sufficient economic pressure and energy to re-consolidate them. That pressure should emerge naturally from an unmanipulated fee market rather than from arbitrary discounts embedded into consensus accounting. The illusion comes from separating the active UTXO set from the permanent ledger. Yes, a spent output can be removed from the active UTXO set, but the witness and every other committed bit remain permanently embedded in the chain. Every archival node must store them forever. Every new node must download them forever. Every copy of Bitcoin must preserve them forever. The distinction is one of active validation state, not physical memory. Viewing Bitcoin through Landauer’s principle changes the discussion. The dominant cost is not validating the current state; it is the irreversible commitment and preservation of information. Once a bit crosses the proof-of-work boundary, it becomes part of Bitcoin’s permanent physical state. Consensus commits serialized memory, not CPU cycles. Expanding effective blockspace through witness discounts is a high-time-preference solution. Bitcoin conserves demand for finite blockspace. That cost is paid either immediately in satoshis through the fee market or deferred as a perpetual tax on every node that must transmit, download, verify, and preserve the additional physical bits for as long as Bitcoin exists. Looking at the system through energy density makes the distortion clearer. Whether expressed as joules per satoshi per mb^2, joules per mb^2, the total proof of work securing the block remains unchanged while the amount of permanently committed memory increases. The same work is now spread across more conserved bits. The energy density of Bitcoin’s permanent memory decreases. UTXOs are less energetically dense because the same conserved work is distributed across more conserved memory. This is the deeper engineering issue. We have altered the economics of blockspace by assigning different prices to identical permanently conserved bits. That distinction is based on how software uses those bits after commitment, not on the physical reality that every committed bit occupies immutable consensus memory. If Bitcoin is fundamentally a conserved ledger of energy and information, then every permanently committed bit must ultimately be measured by the same invariant accounting. This also highlights something deeper. To conserve the coin, Bitcoin must first conserve the bit. The distinction between “active state” and “historical state” has physical meaning. While an output remains unspent, the satoshis exist as physical bits within the active UTXO set. Once spent, the value simply changes location in memory to the new block of time. The spent TXO disappears from the active state, but the historical bit remains permanently embedded in the ledger. The state has transformed, but nothing has disappeared. The coin has moved through both memory and time, while the information required to preserve that history remains conserved forever. The cost remains as bits. This is precisely the reinterpretation of Landauer’s principle that Bitcoin makes possible. The original formulation measures the minimum energetic cost of erasing a bit. Bitcoin demonstrates that the more fundamental quantity is not erasure, but irreversible state transition through permanent memory. The thermodynamic cost is the cost of committing a new distinction (bit) to history. Once committed, that distinction is never destroyed; it becomes part of the conserved informational substrate of the ledger. What appears to be “deletion” is simply a transformation between active and historical state from a perspective of incomplete information. Looking at Bitcoin this way changes the engineering tradeoff entirely. The cost that would ordinarily be expressed through a competitive fee market for a finite bitspace has instead been partially shifted onto every archival node through the perpetual obligation to preserve additional physical bits. The network still bears the cost; it has simply been socialized across every node that chooses to maintain Bitcoin’s complete history. From a low-time-preference perspective, the honest engineering solution is to pay that cost upfront through fees in sats because it acknowledges the true physical cost of permanently committing information. 1 bit must = 1 bit. Once proof of work commits a bit to consensus, its future role inside the protocol becomes irrelevant to its physical cost. Whether the protocol later classifies it as witness data, transaction data, or historical validation data, every archival node must transmit it, verify it, download it, back it up, and preserve it indefinitely. Consensus does not preserve “validation effort”; it preserves immutable physical information. Removing the witness discount is simply an acknowledgement that permanently conserved bits should be accounted for uniformly; the fee market is the free exchange pricing of sats<>bits. The protocol may distinguish between active and historical state for purposes of validation, but the laws of thermodynamics do not; 1 bit = 1 bit regardless if satoshis are present in said memory. If Bitcoin is fundamentally a conserved ledger of energy, information, and time, then every permanently committed bit contributes equally to the irreversible memory of the system. Without conserving the bit, there is no mechanism by which the coin itself can remain conserved. Witness or not, if my node must store it forever, it is consensus memory. I simply want every permanently committed bit to my node to pay the same price because the physical cost of preserving it is the same. We have to be logically consistent. Why is market manipulation thru arbitrary discounting of bits and inflation of Bitcoin’s finite bitspace good in the long term for the protocol and economics, yet the same behavior in fiat land would be mocked by our community? Make it make sense to me. If Segwit/LN is truely good for scaling finite blockspace, then why do we have to tax the nodes? Let the protocol change speak for itself without taxation in bits. Only then we’ll know its true value. Devalue the bit and you devalue the sat; few truly understand this.