<oembed><type>rich</type><version>1.0</version><author_name>Tomas [ARCHIVE] (npub1rs…9evk4)</author_name><author_url>https://nostr.ae/npub1rsp4w56r24w3zv4xy8zfgesep45qmf9rq6aghxfw3wr7yemqnnwsf9evk4</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-04-11&#xA;📝 Original message:On Tue, Apr 11, 2017, at 03:44, Eric Voskuil wrote:&#xA;&#xA;&gt; As I understand it you would split tx inputs and outputs and send them&#xA;&gt; independently, and that you intend this to be a P2P network&#xA;&gt; optimization - not a consensus rule change. So my comments are based&#xA;&gt; on those inferences. If we are talking about consensus changes this&#xA;&gt; conversation will end up in an entirely different place.&#xA;&#xA;&gt; I don&#39;t agree with the input/output relevance statements above. When a&#xA;&gt; tx is announced the entire tx is relevant. It cannot be validated as&#xA;&gt; outputs only. If it cannot be validated it cannot be stored by the&#xA;&gt; node. Validating the outputs only would require the node store invalid&#xA;&gt; transactions.&#xA;&#xA;Splitting transactions only happens *on storage* and is just a minor&#xA;optimization compared to storing them in full. (actually a very recent&#xA;change with only marginally better results). This is simply because the&#xA;output scripts are read on script validation, and storing the outputs of&#xA;the transaction separately ensures better spatial locality of reference&#xA;(the inputs are just &#34;in the way&#34;). This is not relevant when using a&#xA;UTXO-index, because the outputs are then directly stored in the index,&#xA;where bitcrust has to read them from the transaction data.&#xA;&#xA;It is not my intention to send them independently.&#xA; &#xA;&gt; I do accept that a double-spend detection is not an optimal criteria&#xA;&gt; by which to discard a tx. One also needs fee information. But without&#xA;&gt; double-spend knowledge the node has no rational way to defend itself&#xA;&gt; against an infinity of transactions that spend the minimal fee but&#xA;&gt; also have conflicting inputs (i.e. risking the fee only once). So tx&#xA;&gt; (pool) validation requires double-spend knowledge and at least a&#xA;&gt; summary from outputs.&#xA;&#xA;Double spent information is still available to the network node and&#xA;could still be used for DoS protection, although I do believe&#xA;alternatives may exist.&#xA; &#xA;&gt; &#xA;&gt; A reorg is conceptual and cannot be engineered out. What you are&#xA;&gt; referring to is a restructuring of stored information as a consequence&#xA;&gt; of a reorg. I don&#39;t see this as related to the above. The ability to&#xA;&gt; perform reorganization via a branch pointer swap is based not on the&#xA;&gt; order or factoring of validation but instead on the amount of&#xA;&gt; information stored. It requires more information to maintain multiple&#xA;&gt; branches.&#xA;&gt; &#xA;&gt; Transactions have confirmation states, validation contexts and spender&#xA;&gt; heights for potentially each branch of an unbounded number of&#xA;&gt; branches. It is this requirement to maintain that state for each&#xA;&gt; branch that makes this design goal a very costly trade-off of space&#xA;&gt; and complexity for reorg speed. As I mentioned earlier, it&#39;s the&#xA;&gt; optimization for this scenario that I find questionable.&#xA;&#xA;Sure, we can still call switching tips a &#34;reorg&#34;. And it is indeed a&#xA;trade off as orphan blocks are stored, but a block in the spend tree&#xA;takes only ~12kb and contains  the required state information. &#xA;&#xA;I believe this trade off  reduced complexity. For the earlier tree this&#xA;could be pruned.&#xA;&#xA;&gt; Because choosing the lesser amount of work is non-consensus behavior.&#xA;&gt; Under the same circumstances (i.e. having seen the same set of blocks)&#xA;&gt; two nodes will disagree on whether there is one confirmation or no&#xA;&gt; confirmations for a given tx. This disagreement will persist (i.e. why&#xA;&gt; take the weaker block only to turn around and replace it with the&#xA;&gt; stronger block that arrives a few seconds or minutes later). It stands&#xA;&gt; to reason that if one rejects a stronger block under a race condition,&#xA;&gt; one would reorg out a stronger block when a weaker block arrives a&#xA;&gt; little after the stronger block. Does this &#34;optimization&#34; then apply&#xA;&gt; to chains of blocks too?&#xA;&#xA;The blockchain is - by design - only eventually consistent across nodes.&#xA;Even if nodes would use the same &#34;tip-selection&#34; rules, you cannot rely&#xA;on all blocks being propagated and hence each transaction having the&#xA;same number of confirmations across all nodes.&#xA;&#xA;As a simpler example, if two miners both mine a block at approximately&#xA;the same time and send it to each other, then surely they would want to&#xA;continue mining on their own block. Otherwise they would be throwing&#xA;away their own reward.  &#xA;&#xA;And yes, this can also happen over multiple blocks, but the chances of&#xA;consistency are vastly increased with each confirmation.&#xA;&#xA;&gt; Accepting a block that all previous implementations would have&#xA;&gt; rejected under the same circumstance could be considered a hard fork,&#xA;&gt; but you may be right.&#xA;&#xA;I am not talking about rejecting blocks, I am only talking choosing on&#xA;which tip to mine.&#xA;&#xA;&gt; &gt; Frankly, I think this is a bit of an exaggeration. Soft forks are &#xA;&gt; &gt; counted on a hand, and I don&#39;t think there are many - if any - &#xA;&gt; &gt; transactions in the current chain that have changed compliance &#xA;&gt; &gt; based on height.&#xA;&gt; &#xA;&gt; Hope is a bug.&#xA;&gt; &#xA;&gt; If you intend this to be useful it has to help build the chain, not&#xA;&gt; just rely on hardwiring checkpoints once rule changes are presumed to&#xA;&gt; be buried deeply enough to do so (as the result of other implementations&#xA;&gt; ).&#xA;&gt; &#xA;&gt; I understand this approach, it was ours at one time. There is a&#xA;&gt; significant difference, and your design is to some degree based on a&#xA;&gt; failure to fully consider this. I encourage you to not assume any&#xA;&gt; consensus-related detail is too small.&#xA;&#xA;I am not failing to consider this, and I don&#39;t consider this too small .&#xA;But ensuring contextual transaction validity by &#34;validate =&gt;  valid with&#xA;rules X,Y,Z&#34; and then checking the active rules (softfork activation) on&#xA;order validation, will give logically the same results as &#34;validate with&#xA;X,Y,Z =&gt; valid&#34;. This is not &#34;hardwiring checkpoints&#34; at all.&#xA;&#xA;&gt; You cannot have a useful performance measure without full compliance.&#xA;&#xA;I agree that the results are preliminary and I will post more if the&#xA;product reaches later stages.&#xA;&#xA;&gt; It&#39;s worth noting that many of your stated objectives, including&#xA;&gt; modularity, developer platform, store isolation, consensus rule&#xA;&gt; isolation (including optional use of libbitcoinconsensus) are implemente&#xA;&gt; d.&#xA;&gt; &#xA;&gt; It seems like you are doing some good work and it&#39;s not my intent to&#xA;&gt; discourage that. Libbitcoin is open source, I don&#39;t get paid and I&#39;m&#xA;&gt; not selling anything. But if you are going down this path you should&#xA;&gt; be aware of it and may benefit from our successes as well as some of&#xA;&gt; the other stuff :). And hopefully we can get the benefit of your&#xA;&gt; insights as well.&#xA; &#xA;&#xA;Thank you, I will definitely further dive into libbitcoin, and see what&#xA;insights I can use for Bitcrust.&#xA;&#xA;Tomas</html></oembed>