From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UfDLn-000065-Ie for bitcoin-development@lists.sourceforge.net; Wed, 22 May 2013 18:01:23 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of hushmail.com designates 65.39.178.235 as permitted sender) client-ip=65.39.178.235; envelope-from=shaker521@hushmail.com; helo=smtp5.hushmail.com; Received: from smtp5a.hushmail.com ([65.39.178.235] helo=smtp5.hushmail.com) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1UfDLl-0008JO-MN for bitcoin-development@lists.sourceforge.net; Wed, 22 May 2013 18:01:23 +0000 Received: from smtp5.hushmail.com (smtp5a.hushmail.com [65.39.178.235]) by smtp5.hushmail.com (Postfix) with SMTP id 6BED0580B4 for ; Wed, 22 May 2013 18:01:15 +0000 (UTC) Received: from smtp.hushmail.com (w5.hushmail.com [65.39.178.80]) by smtp5.hushmail.com (Postfix) with ESMTP; Wed, 22 May 2013 18:01:12 +0000 (UTC) Received: by smtp.hushmail.com (Postfix, from userid 99) id D88AEE6736; Wed, 22 May 2013 18:01:11 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 22 May 2013 18:01:08 +0000 To: "Wladimir" From: shaker521@hushmail.com In-Reply-To: References: <20130522032504.1C461E6718@smtp.hushmail.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="UTF-8" Message-Id: <20130522180111.D88AEE6736@smtp.hushmail.com> X-Spam-Score: -2.3 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [65.39.178.235 listed in list.dnswl.org] -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shaker521[at]hushmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (shaker521[at]hushmail.com) 0.0 SPF_HELO_NEUTRAL SPF: HELO does not match SPF record (neutral) X-Headers-End: 1UfDLl-0008JO-MN Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] BIP 0021 idea: sendmany X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 18:01:23 -0000 You can pull use cases out of thin air. Humble Bundle is a perfect example. BIP 0001 instructed me to introduce the idea here before performing the labor of writing a new BIP. If others reply in support then the labor will be justified. The intended purpose is to give users the simplest way to perform a transaction with multiple outputs. Ideal would be to provide a single URI (or QR code or what have you) that specifies all of the outputs (address:amount pairs) and minimizes opportunities for user error, e.g. by omitting or altering an output. I'll take you through the process that brought me to the solution below. The main part of the current bitcoin URI scheme is a single bitcoinaddress. If the sendmany scheme left this foundation unchanged there will be difficulty with both semantics and backwards compatibility. Contemplate some use cases for sendmany URIs. Are each of the outputs in a given transaction equally important? In other words, are all outputs necessary to fulfill the terms of the exchange between the parties? I would say so. Not that the bitcoin client should forbid changing the outputs after processing the URI, but that it should reject the entire URI if the client does not support the multi-output syntax. The discussion of backward compatibility in BIP 0021 recommends against reqparams being used in a mission-critical way while users upgrade their clients. A reqparams approach would permit the gravest possible error, i.e. an older client silently discarding all but the first address and allowing the user unwittingly to violate the terms of the exchange AND irreversibly send some BTC to a possibly adversarial party. We must guard against this potentially devastating failure mode. After a study of pchar and other BNF terms (http://www.w3.org/TR/hdml20-8.html) I propose the following format with optional labels and amounts: bitcoin:label/address:amount;label/address:amount?params Before arriving at this format I tried and rejected these other output formats: address/label:amount (ambiguous since ":" and amount are allowed in label's *pchar) address:amount/label (less readable since the label is split from its referent) The proposed format keeps labels and addresses together for human readability. The label delimiter "/" is a reserved character which eliminates ambiguous cases, making this format easy for bitcoin clients to parse. Therefore I propose the following grammar: bitcoinurn = "bitcoin:" outputs [ "?" bitcoinparams ] outputs = output *[ ";" output ] | bitcoinaddress output = [ label "/" ] bitcoinaddress [ ":" amount ] bitcoinaddress = base58 *base58 amount = *digit [ "." *digit ] bitcoinparams = bitcoinparam *[ "&" bitcoinparam ] bitcoinparam = amountparam | labelparam | messageparam | otherparam | reqparam amountparam = "amount=" amount labelparam = "label=" label label = *pchar messageparam = "message=" *pchar otherparam = pchar *pchar "=" *pchar reqparam = "req-" pchar *pchar "=" *pchar This may be added under "Simpler syntax": bitcoin:
[:][/