<oembed><type>rich</type><version>1.0</version><author_name>npub1tjephawh7fdf6358jufuh5eyxwauzrjqa7qn50pglee4tayc2ntqcjtl6r</author_name><author_url>https://nostr.ae/npub1tjephawh7fdf6358jufuh5eyxwauzrjqa7qn50pglee4tayc2ntqcjtl6r</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-12-18&#xA;📝 Original message:Hello all,&#xA;&#xA;For a long time, I was personally of the opinion that soft forks&#xA;constituted a mild security reduction for old full nodes, albeit one&#xA;that was preferable to hard forks due to being far less risky, easier,&#xA;and less forceful to deploy.&#xA;&#xA;After thinking more about this, I&#39;m not convinced that it is even that anymore.&#xA;&#xA;Let&#39;s analyze all failure modes (and feel free to let me know whether&#xA;I&#39;ve missed any specific ones):&#xA;&#xA;1) The risk of an old full node wallet accepting a transaction that is&#xA;invalid to the new rules.&#xA;&#xA;The receiver wallet chooses what address/script to accept coins on.&#xA;They&#39;ll upgrade to the new softfork rules before creating an address&#xA;that depends on the softfork&#39;s features.&#xA;&#xA;So, not a problem.&#xA;&#xA;2) The risk of an old full node wallet accepting a transaction whose&#xA;coins passed through a script that depends on the softforked rules.&#xA;&#xA;It is reasonable that the receiver of a transaction places some trust&#xA;in the sender, and on the basis of that, decides to reduce the number&#xA;of confirmations before acceptance. In case the transaction indirectly&#xA;depends on a low-confirmation transaction using softforked rules, it&#xA;may be treated as an anyone-can-spend transaction. Obviously, no trust&#xA;can be placed in such a transactions not being reorged out and&#xA;replaced with an incompatible one.&#xA;&#xA;However, this problem is common for all anyonecanspend transactions,&#xA;which are perfectly legal today in the blockchain. So, if this is a&#xA;worry, we can solve it by marking incoming transactions as &#34;uncertain&#xA;history&#34; in the wallet if they have an anyonecanspend transaction with&#xA;less than 6 confirmations in its history. In fact, the same problem to&#xA;a lesser extent exists if coins pass through a 1-of-N multisig or so,&#xA;because you&#39;re not only trusting the (indirect) senders, but also&#xA;their potential cosigners.&#xA;&#xA;3) The risk of an SPV node wallet accepting an unconfirmed transaction&#xA;which is invalid to new nodes.&#xA;&#xA;Defrauding an SPV wallet with an invalid unconfirmed transaction&#xA;doesn&#39;t change with the introduction of new consensus rules, as they&#xA;don&#39;t validate them anyway.&#xA;&#xA;In the case the client trusts the full node peer(s) it is connected to&#xA;to do validation before relay, nodes can either indicate (service bit&#xA;or new p2p message) which softforks are accepted (as it only matters&#xA;to SPV wallets that wish to accept transactions using new style script&#xA;anyway), or wallets can rely on the new rules being non-standard even&#xA;to old full nodes (which is typically aimed for in softforks).&#xA;&#xA;4) The risk of an SPV node wallet accepting a confirmed transaction&#xA;which is invalid to new nodes&#xA;&#xA;Miners can of course construct an invalid block purely for defrauding&#xA;SPV nodes, without intending to get that block accepted by full nodes.&#xA;That is expensive (no subsidy/fee income for those blocks) and more&#xA;importantly it isn&#39;t in any way affected by softforks.&#xA;&#xA;So the only place where this matters is where miners create a block&#xA;chain that violates the new rules, and still get it accepted. This&#xA;requires a hash rate majority, and sufficiently few economically&#xA;important full nodes that forking them off is a viable approach.&#xA;&#xA;It&#39;s interesting that even though it requires forking off full nodes&#xA;(who will notice, there will be an invalid majority hash rate chain to&#xA;them), the attack only allows defrauding SPV nodes. It can&#39;t be used&#xA;to bypass any of the economic properties of the system (as subsidy and&#xA;other resource limits are still enforced by old nodes, and invalid&#xA;scripts will either not be accepted by old full nodes wallets, or are&#xA;as vulnerable as unrelated anyonecanspends).&#xA;&#xA;Furthermore, it&#39;s easily preventable by not using the feature in SPV&#xA;wallets until a sufficient amount of economically relevant full nodes&#xA;are known to have upgraded, or by just waiting for enough&#xA;confirmations.&#xA;&#xA;&#xA;&#xA;So, we&#39;d of course prefer to have all full nodes enforce all rules,&#xA;but the security reduction is not large. On the other hand, there are&#xA;also security advantages that softforks offer:&#xA;&#xA;A) Softforks do not require the pervasive consensus that hardforks&#xA;need. Soft forks can be deployed without knowing when all full nodes&#xA;will adopt the rule, or even whether they will ever adopt it at all.&#xA;&#xA;B) Keeping up with hard forking changes puts load on full node&#xA;operators, who may choose to instead switch to delegating full&#xA;validation to third parties, which is worse than just validating the&#xA;old rules.&#xA;&#xA;C) Hardfork coordination has a centralizing effect on development. As&#xA;hardforks can only be deployed with sufficient node deployment, they&#xA;can&#39;t just be triggered by miner votes. This requires central&#xA;coordination to determine flag times, which is incompatible with&#xA;having multiple independent consensus changes being proposed. For&#xA;softforks, something like BIP9 supports having multiple independent&#xA;softforks in flight, that nodes can individually chose to accept or&#xA;not, only requiring coordination to not choose clashing bit numbers.&#xA;For hardforks, there is effectively no choice but having every&#xA;codebase deployed at a particular point in time to support every&#xA;possible hard forks (there can still be an additional hashpower based&#xA;trigger conditions for hardforks, but all nodes need to support the&#xA;fork at the earliest time it can happen, or risk being forked off).&#xA;&#xA;D) If you are concerned about the security degradation a soft fork&#xA;might bring, you can always configure your node to treat a (signalled)&#xA;softfork as a hardfork, and stop processing blocks if a sortfork&#xA;condition is detected. The other direction is not possible.&#xA;&#xA;-- &#xA;Pieter</html></oembed>