<div dir="ltr"><div><div>The message could specify:<br></div><div>{ stib: 0x01,<br></div><div>  TxnCount: (# of entries in the Indexes array)<br></div><div>  Indexes: [{BLK: Block#,Txns:[TxIndex,TxIndex,...]},{BLK: Block#,Txns:[...]}],<br></div><div>  NewUTXO: (The script that will spend these coins)<br>}<br></div><b>stib </b>is a Script Template Index Bitfield: Must (currently) be the byte 0x01, to indicate the &quot;vanilla&quot; script Chris identified.  If other scripts appear to fit the bill in the future, they can be assigned to other bits.<br></div><div><b>Indexes </b>is a list of pairs that identify a block by its height and a list of indexes into the block.  This puts the onus on the transactor to identify all the inputs instead of requiring the miner to scan for them.<br><br></div><div>If block heights and transaction indexes are 32-bit integers, this reduces the per-input size cost by at least 100 bytes, if I did my math right.<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 25, 2015 at 6:16 AM, Erik via bitcoin-dev <span dir="ltr">&lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundation.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
<br>
Nice idea. I see it as an important feature because of several reasons:<br>
<br>
Considering the website example, where most websites uses static<br>
content, a bitcoin address could accumulate a dozen of transactions<br>
before the webmaster changes the address to a new one.<br>
<br>
Also consider a QR-code address printed on paper. That address is also<br>
prone to multiple payments, which could be several small ones.<br>
<br>
You ask someone to pay an amount of BTC. That person would be someone<br>
that want you to actually don&#39;t get any money at all, so instead of<br>
sending one payment, the person sends a lot of small TXes. It costs a<br>
lot more to achieve this, but that doesn&#39;t bother the person sending the<br>
transactions. What you see is the transactions to the address you&#39;ve<br>
agreed sum up to the amount you asked for. When you later try to spend<br>
it, you can&#39;t because of that the size of all UXTOs is too high to even<br>
overcome the tx fee.<br>
<br>
If you use a wildcard transaction to bake them together into one UXTO,<br>
you will not need to pay more than just one tx fee to solve the problem<br>
you&#39;ve got. Also the network will benefit from this because the<br>
alternative is to not spend those UXTOs at all because it costs more<br>
than it earns, leaving lots of UXTOs in the databases.<br>
<br>
Some problems to consider is:<br>
* Which addresses should be involved in a wildcard TX.<br>
* How to not make it repeatable or delayed so that UXTOs not intended to<br>
be in that TX wouldn&#39;t be included.<br>
* How to make it impossible to sign an wildcard TX with a future date.<br>
* How to limit outputs so they not are in risk being double-spent.<br>
* How to guarantee that the output is actually calculated from all the<br>
inputs involved and not less, making insane TX fees available.<br>
<br>
I could see possible solutions to this problems:<br>
* Using the highest block height number of transactions to include or<br>
maybe better, the UXTO of one transaction destined to that address<br>
involved in that block - that implies collecting all UXTOs in that block.<br>
* Using a signature that includes the date. To let it be present more<br>
times in the blockchain requires another timestamp that is newer than a<br>
wildcard TX already existing in the blockchain. Also make the<br>
transaction invalid to put in a block if the timestamp is behind a<br>
certain time or in the future.<br>
* Using the coinbase UXTO or the block hash from the latest block as<br>
proof that the transaction isn&#39;t created earlier than that. Also makes<br>
the wildcard TX invalid if that block isn&#39;t part of the blockchain<br>
anymore. This also have a secondary effect of certifying the blockchain<br>
itself making it more difficult to fork it from far behind because it<br>
will effectively remove all transactions depending on a UXTO including<br>
this type of certification.<br>
* Either using a priority like way to determine what are being left to<br>
wildcard in a block - all transactions spending UXTOs of that address is<br>
removed before the wildcard TX if they occurs in the same block. Either<br>
it is possible to set a rule that if a wildcard TX exists in one block,<br>
it is invalid to include other UXTOs that is to be be included in the<br>
wildcard from the same address in the same block. (Classic<br>
double-spending rule)<br>
* Using a special form of output specifying only one destination<br>
address/script and the amount of fees to pay. If the amount of fees<br>
could be payed, then the rest will be sent to the destination address.<br>
This covers intentional delaying and also discourage forking the<br>
blockchain by miners to making the signature UXTO appear later than more<br>
recent transaction in a new fork to collect the later txes as fee.<br>
<br>
This transaction type would in fact look like a time-limited offer to<br>
the network to reduce the UXTO set of an address. I guess some miners<br>
will then use a logic that prefers this types of TXes even if they are<br>
low-fee because, if they removes lots of UXTOs, they benefits the network.<br>
<br>
Sincerely,<br>
Erik.<br>
<div><div class="h5"><br>
Den 2015-11-25 kl. 02:26, skrev Chris Priest via bitcoin-dev:<br>
&gt; 1. Technically is it promoting address reuse, but in this case, I<br>
&gt; think it&#39;s OK. The primary purpose of a coalescing transaction is to<br>
&gt; clear out *all* funds associated with one address and send them to<br>
&gt; another address (belonging to the same owner). If you coalesce the<br>
&gt; inputs to the same address over and over again, you an do that, but<br>
&gt; you&#39;ll run the risk of leaking your private key.<br>
&gt;<br>
&gt; 2. I see these transactions being broadcast in the background when the<br>
&gt; user is not planning on sending or receiving any payments. By the time<br>
&gt; the wallet user wants to spend funds from the address, the coalescing<br>
&gt; transaction should be sufficiently deep enough in the blockchain to<br>
&gt; avoid re-org tomfoolery. Exchanges and payment processors who take in<br>
&gt; payments around the clock will probably never use these transactions,<br>
&gt; at least not on &quot;live&quot; addresses.<br>
&gt;<br>
&gt; 3. I never thought of that, but thats a benefit too!<br>
&gt;<br>
&gt; On 11/24/15, Jannes Faber via bitcoin-dev<br>
&gt; &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br>
&gt;&gt; Few issues I can think of:<br>
&gt;&gt;<br>
&gt;&gt; 1. In its basic form this encourages address reuse. Unless the<br>
wildcard can<br>
&gt;&gt; be constructed such that it can match a whole branch of an HD  wallet.<br>
&gt;&gt; Although I guess that would tie all those addresses together making<br>
HD moot<br>
&gt;&gt; to begin with.<br>
&gt;&gt;<br>
&gt;&gt; 2. Sounds pretty dangerous during reorgs. Maybe such a transaction should<br>
&gt;&gt; include a block height which indicates the maximum block that any<br>
utxo can<br>
&gt;&gt; match. With the requirement that the specified block height is at<br>
least 100<br>
&gt;&gt; blocks in the past. Maybe add a minimum block height as well to prevent<br>
&gt;&gt; unnecessary scanning (with the requirement that at least one utxo must be<br>
&gt;&gt; in that minimum block).<br>
&gt;&gt;<br>
&gt;&gt; 3. Seems like a nice way to the reduce utxo set. But hard to say how<br>
&gt;&gt; effective it would really be.<br>
&gt;&gt; On 25 Nov 2015 12:48 a.m., &quot;Chris Priest via bitcoin-dev&quot; &lt;<br>
&gt;&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt;&gt; This idea could be applied by having the wildcard signature apply to<br>
&gt;&gt;&gt;&gt; all<br>
&gt;&gt;&gt;&gt; UTXOs that are of a standard form and paid to a particular address, and<br>
&gt;&gt;&gt; be<br>
&gt;&gt;&gt;&gt; a signature of some kind of message to that effect.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I think this is true. Not *all* transactions will be able to match the<br>
&gt;&gt;&gt; wildcard. For instance if someone sent some crazy smart contract tx to<br>
&gt;&gt;&gt; your address, the script associated with that tx will be such that it<br>
&gt;&gt;&gt; will not apply to the wildcard. Most &quot;vanilla&quot; utxos that I&#39;ve seen<br>
&gt;&gt;&gt; have the formula: OP_DUP OP_HASH160 [a hash corresponding to your<br>
&gt;&gt;&gt; address] OP_EQUALVERIFY OP_CHECKSIG&quot;. Just UTXOs in that form could<br>
&gt;&gt;&gt; apply to the wildcard.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 11/24/15, Dave Scotese via bitcoin-dev<br>
&gt;&gt;&gt; &lt;<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; What is required to spend bitcoin is that input be provided to the UTXO<br>
&gt;&gt;&gt;&gt; script that causes it to return true.  What Chris is proposing breaks<br>
&gt;&gt;&gt;&gt; the<br>
&gt;&gt;&gt;&gt; programmatic nature of the requirement, replacing it with a requirement<br>
&gt;&gt;&gt;&gt; that the secret be known.  Granted, the secret is the only requirement<br>
&gt;&gt;&gt;&gt; in<br>
&gt;&gt;&gt;&gt; most cases, but there is no built-in assumption that the script always<br>
&gt;&gt;&gt;&gt; requires only that secret.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; This idea could be applied by having the wildcard signature apply to<br>
&gt;&gt;&gt;&gt; all<br>
&gt;&gt;&gt;&gt; UTXOs that are of a standard form and paid to a particular address, and<br>
&gt;&gt;&gt; be<br>
&gt;&gt;&gt;&gt; a signature of some kind of message to that effect.  I imagine the cost<br>
&gt;&gt;&gt; of<br>
&gt;&gt;&gt;&gt; re-scanning the UTXO set to find them all would justify a special extra<br>
&gt;&gt;&gt;&gt; mining fee for any transaction that used this opcode.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Please be blunt about any of my own misunderstandings that this email<br>
&gt;&gt;&gt; makes<br>
&gt;&gt;&gt;&gt; clear.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Tue, Nov 24, 2015 at 1:51 PM, Bryan Bishop via bitcoin-dev &lt;<br>
&gt;&gt;&gt;&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Tue, Nov 24, 2015 at 11:34 AM, Chris Priest via bitcoin-dev &lt;<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; **OP_CHECKWILDCARDSIGVERIFY**<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Some (minor) discussion of this idea in -wizards earlier today<br>
&gt;&gt;&gt;&gt;&gt; starting<br>
&gt;&gt;&gt;&gt;&gt; near near &quot;09:50&quot; (apologies for having no anchor links):<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://gnusha.org/bitcoin-wizards/2015-11-24.log" rel="noreferrer" target="_blank">http://gnusha.org/bitcoin-wizards/2015-11-24.log</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; - Bryan<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://heybryan.org/" rel="noreferrer" target="_blank">http://heybryan.org/</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="tel:1%20512%20203%200507" value="+15122030507">1 512 203 0507</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; bitcoin-dev mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; I like to provide some work at no charge to prove my value. Do you need<br>
&gt;&gt;&gt;&gt; a<br>
&gt;&gt;&gt;&gt; techie?<br>
&gt;&gt;&gt;&gt; I own Litmocracy &lt;<a href="http://www.litmocracy.com" rel="noreferrer" target="_blank">http://www.litmocracy.com</a>&gt; and Meme Racing<br>
&gt;&gt;&gt;&gt; &lt;<a href="http://www.memeracing.net" rel="noreferrer" target="_blank">http://www.memeracing.net</a>&gt; (in alpha).<br>
&gt;&gt;&gt;&gt; I&#39;m the webmaster for The Voluntaryist &lt;<a href="http://www.voluntaryist.com" rel="noreferrer" target="_blank">http://www.voluntaryist.com</a>&gt;<br>
&gt;&gt;&gt; which<br>
&gt;&gt;&gt;&gt; now accepts Bitcoin.<br>
&gt;&gt;&gt;&gt; I also code for The Dollar Vigilante &lt;<a href="http://dollarvigilante.com/" rel="noreferrer" target="_blank">http://dollarvigilante.com/</a>&gt;.<br>
&gt;&gt;&gt;&gt; &quot;He ought to find it more profitable to play by the rules&quot; - Satoshi<br>
&gt;&gt;&gt;&gt; Nakamoto<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; bitcoin-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a><br>
&gt;&gt;&gt; <a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; bitcoin-dev mailing list<br>
&gt; <a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a><br>
&gt; <a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
<br>
</div></div>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.22 (GNU/Linux)<br>
<br>
iQIcBAEBAgAGBQJWVcKuAAoJEJ51csApon2ofiYP/15DXthFvNg9pBPOaaboGOh1<br>
DhN7R3SXnt4PTLygQGO3AkTRcDinQrZ0Q4GDLIgrOkaKJ4yr6FtnoEYGORQSfFkx<br>
946eWtqkR4+IJi7gYIIn1yOfFjWKUp9l4OOWBA8Rxsn0tZUAQPXzf2f+dxAaj0Gd<br>
fLrftYvK1XJ8BolhwNfonJ193RJGFynQfWqZ+XeQQMS5LW23RpQLyI26f495MPHG<br>
Wug7M/Aq50JrJDe1OyhjnnjYxNV6Gdbg9o3YIdj2gaOsBKHzsPK+LjcLCdRqD/OI<br>
TBwmwiI4vrOl3HzvtucHxQqnaP43wubydVhPfmjG97tDaj2cVLjadc17e77PzCVI<br>
8N21oVIWDzyW6y14REoo1Zs4A9ALpHjXAGWdls71eP1NIFcfdFAJWhk2/giisw8o<br>
ZsQTgq2mUHS+n4q3NjFEwGxS011yADE3Uf3ryjuTjp3HVQf3lZxn4E4Z7z/4gkXm<br>
/h/3Ln7PkjEmOqp9htgHcYW7q5goeJzV0xNDBoY9wvOlJQcAh6nTiS4SJEiFJvXU<br>
xVZIGZsisrdW/1CfcszOi7KFGaaV1VlAXQnuJHj1I3dJ2r68yi5TQk6voMNFprEz<br>
2R4zuZKjIoH79rOjDV8l6XBIU1Kh92GEzCFlTicfvnAoa853fGZt+V/77ralftJW<br>
E6sERK8uG8S3KdBSVQ7K<br>
=1xdi<br>
-----END PGP SIGNATURE-----<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">I like to provide some work at no charge to prove my value. Do you need a techie?  <br>I own <a href="http://www.litmocracy.com" target="_blank">Litmocracy</a> and <a href="http://www.memeracing.net" target="_blank">Meme Racing</a> (in alpha). <br>I&#39;m the webmaster for <a href="http://www.voluntaryist.com" target="_blank">The Voluntaryist</a> which now accepts Bitcoin.<br>I also code for <a href="http://dollarvigilante.com/" target="_blank">The Dollar Vigilante</a>.<br>&quot;He ought to find it more profitable to play by the rules&quot; - Satoshi Nakamoto</div></div>
</div>