<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub18zpfny5rg862xszvk3d4hnna037cj0dem7dpg36azurwx99wpnfquu3jvu.rss" />
  <link href="https://nostr.ae/npub18zpfny5rg862xszvk3d4hnna037cj0dem7dpg36azurwx99wpnfquu3jvu" />
  <id>https://nostr.ae/npub18zpfny5rg862xszvk3d4hnna037cj0dem7dpg36azurwx99wpnfquu3jvu</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqsdfhh3ea4g4hx0eavx60hmvkmeu2lkutn00zmq8ugqazhwu388wjczyqug9xvjsdqlfg6qfj69kk7w0478mzfah80e59z8t5tsdcc54cxdywyjpwx</id>
    
      <title type="html">📅 Original date posted:2013-05-20 📝 Original message:The ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdfhh3ea4g4hx0eavx60hmvkmeu2lkutn00zmq8ugqazhwu388wjczyqug9xvjsdqlfg6qfj69kk7w0478mzfah80e59z8t5tsdcc54cxdywyjpwx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw9vx5e857lydum08jtqcqp60thraptme8azspcw8swukmm2qep2gjzk3uj&#39;&gt;nevent1q…k3uj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2013-05-20&lt;br/&gt;📝 Original message:The current BitCoin implementation is subject to relatively easy double &lt;br/&gt;spend attack for 0 confirmation payments.  Yet 0 confirmation payments &lt;br/&gt;are needed for typical in person transactions like most purchases at a &lt;br/&gt;local business.&lt;br/&gt;&lt;br/&gt;Notably, it is easy to transmit two transactions from the same output at &lt;br/&gt;the same time to different sets of nodes on the network by using two &lt;br/&gt;instances of bitcoind with same wallet file and a spend on each daemon &lt;br/&gt;initiated by RPC by some easy to implement code.  If the first attempt &lt;br/&gt;to pay the merchant doesn&amp;#39;t go through because they received the &amp;#34;wrong&amp;#34; &lt;br/&gt;transaction it could be quickly followed up with another initiated spend &lt;br/&gt;from a different output switching which daemon sends the transaction the &lt;br/&gt;merchant is expecting.  This means an unsophisticated attacker can &lt;br/&gt;reliably get away with this attack and it would be worth while for small &lt;br/&gt;transactions.  Given this, I would be reluctant to trust 0 confirmation &lt;br/&gt;transactions at all though I think many do in practice.  Someone could &lt;br/&gt;write and publish a special daemon to execute this attack further &lt;br/&gt;reducing the cost.&lt;br/&gt;&lt;br/&gt;Right now a node will drop any second spend of the same output in the &lt;br/&gt;memory pool.  After the first transaction has propagated through the &lt;br/&gt;network issuing a second double spend transaction isn&amp;#39;t likely to be &lt;br/&gt;seen by a significant number of miners as most nodes especially non &lt;br/&gt;miner nodes will drop this transaction.  Today, it is necessary to &lt;br/&gt;transmit both transactions on the network nearly simultaneously to &lt;br/&gt;reliably get away with this simple attack.  If in this case, the &lt;br/&gt;receiving end is quickly notified of the double spend this attack &lt;br/&gt;becomes more more difficult to get away with.&lt;br/&gt;&lt;br/&gt;If the second transaction is relayed instead of being dropped to notify &lt;br/&gt;the receiving party of the double spend, most miners will receive both &lt;br/&gt;transactions and it is possible that some or even many of the miners &lt;br/&gt;would replace the first transaction with the second if it has a higher &lt;br/&gt;fee as it would be in their short term interest. This can happen some &lt;br/&gt;time after the first transaction has propagated through the network so &lt;br/&gt;the receiving end wouldn&amp;#39;t get a timely notification of the double &lt;br/&gt;spend.  Depending on the choices of the miners, this approach to double &lt;br/&gt;spend notification could exacerbate the very problem it was attempting &lt;br/&gt;to fix compared to the current implementation.  While miners might &lt;br/&gt;continue to drop the second spends, the easy availability of the second &lt;br/&gt;spends would increase the short term reward for changing this policy.&lt;br/&gt;&lt;br/&gt;This problem can be fixed if instead of sending the second transaction a &lt;br/&gt;new double spend message is sent with proof of the double spend but not &lt;br/&gt;the complete transactions.  This would allow the receiving end to be &lt;br/&gt;quickly notified of a double spend while in no way increase the chance &lt;br/&gt;over the current implementation that a double spend would be successful.&lt;br/&gt;&lt;br/&gt;The proof of the double spend would include the scriptSig (input) from &lt;br/&gt;the original transactions and the hashes from the &amp;#34;simplified&amp;#34; &lt;br/&gt;transaction used by OP_CHECKSIG of the scriptPubKey (output) but not the &lt;br/&gt;entire transaction.  This is the hash computed by the SignatureHash &lt;br/&gt;function in script.cpp.   The double spend notification message should &lt;br/&gt;contain proofs of both signed transaction spending the same output &lt;br/&gt;ordered by hash to produce a canonical proof for a specific two &lt;br/&gt;transactions.  To reduce DOS potential, the proof should not be relayed &lt;br/&gt;unless one of the original transactions has been received to ensure &lt;br/&gt;there is some commitment to the block chain and different double spend &lt;br/&gt;proofs of the same output should not be relayed.  The forwarding of &lt;br/&gt;transactions should remain exactly the same as it is now where the &lt;br/&gt;second transaction is dropped but a double spend message is transmitted &lt;br/&gt;if appropriate.&lt;br/&gt;&lt;br/&gt;The existing block chain needs to be checked to make sure the proof of &lt;br/&gt;double spend couldn&amp;#39;t have been derived from the block chain and a &lt;br/&gt;single spend in the memory pool.  This could happen if there was already &lt;br/&gt;an identical transaction in the block chain.  This would typically only &lt;br/&gt;happen if someone was paying someone else the same amount they had &lt;br/&gt;before and neither side changed addresses.  In this case double spend &lt;br/&gt;detection wouldn&amp;#39;t be reliable as it could be generated by anyone, but &lt;br/&gt;both the sending and receiving client could detect this situation and &lt;br/&gt;warn the user.&lt;br/&gt;&lt;br/&gt;It would still be possible for an attacker to send the second &lt;br/&gt;transaction directly to powerful miners but this is a distinctly less &lt;br/&gt;viable attack than the current double spend attack.&lt;br/&gt;&lt;br/&gt;I would expect this double spend notification implementation to make &lt;br/&gt;double spends more costly than they are worth for most cases today that &lt;br/&gt;0 confirmation acceptance is needed.  That said over time this provision &lt;br/&gt;might become less effective.  As the reward for each block mined &lt;br/&gt;decreases, transactions fees will become a more significant part of the &lt;br/&gt;mining reward accordingly increasing the incentive to replace &lt;br/&gt;transactions with higher fees.  Today most BitCoin participants have a &lt;br/&gt;high expectation of significant future appreciation of BitCoins and &lt;br/&gt;recognize anything that brings into question the integrity of the system &lt;br/&gt;is likely to reduce that future value so they have a long term self &lt;br/&gt;interest to keep up the impression of integrity.  As BitCoin becomes &lt;br/&gt;more establish this incentive will decrease.&lt;br/&gt;&lt;br/&gt;On the other hand, non mining nodes have no incentive to replace by &lt;br/&gt;fee.  The continued increased capital costs of mining would likely &lt;br/&gt;increase the proportion of non mining nodes typically run by those with &lt;br/&gt;an incentive to assure integrity of the network such as merchants.  But &lt;br/&gt;increasing transaction volume is likely to increase node costs which &lt;br/&gt;would push out non mining nodes with lower incentive more than mining &lt;br/&gt;nodes.  Accordingly increasing block size would have a tendency to &lt;br/&gt;reduce the effectiveness of double spend notification.  The primary &lt;br/&gt;point is there are multiple counteracting forces that make predicting &lt;br/&gt;the future effectiveness of double spend notification uncertain.&lt;br/&gt;&lt;br/&gt;I don&amp;#39;t believe this necessary warrants conceding that we can not &lt;br/&gt;provide any protection from non trusted 0 confirmations transaction as a &lt;br/&gt;replace by fee implementation would do.  But it would still be important &lt;br/&gt;to work towards more robust solutions notably various forms of 3rd party &lt;br/&gt;trust.  This could be tamper resistant devices trusted to not duplicate &lt;br/&gt;spends, 3rd party certificates with proof the transaction was spent by &lt;br/&gt;the holder of the certificate or multi signature transactions on the &lt;br/&gt;block chain that must be signed by a trusted 3rd party to spend.  I &lt;br/&gt;would expect it would take significantly longer for the companies and &lt;br/&gt;technologies to be built to implement this on a wide scale than adding &lt;br/&gt;double spend proof messages to the current implementation.  In addition, &lt;br/&gt;there will likely always be some use cases where a 3rd party &lt;br/&gt;(centralization) is not viable.&lt;br/&gt;&lt;br/&gt;Should a BIP and pull request implementing a double spend notification &lt;br/&gt;as described be accepted?&lt;br/&gt;&lt;br/&gt;- Quinn
    </content>
    <updated>2023-06-07T15:02:14Z</updated>
  </entry>

</feed>