public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] BIP 0021 idea: sendmany
@ 2013-05-22  3:25 shaker521
  2013-05-22  8:46 ` Wladimir
  0 siblings, 1 reply; 4+ messages in thread
From: shaker521 @ 2013-05-22  3:25 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 58 bytes --]

Multiple recipients/amounts. Any syntax you like. Thanks!

[-- Attachment #2: Type: text/html, Size: 119 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] BIP 0021 idea: sendmany
  2013-05-22  3:25 [Bitcoin-development] BIP 0021 idea: sendmany shaker521
@ 2013-05-22  8:46 ` Wladimir
  2013-05-22 18:01   ` shaker521
  2013-05-22 18:10   ` shaker521
  0 siblings, 2 replies; 4+ messages in thread
From: Wladimir @ 2013-05-22  8:46 UTC (permalink / raw)
  To: shaker521; +Cc: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

Do you have a specific use case in mind?

Maybe - if you have a percentage slider like with humble bundles you can
make it more explicit what part went where?

In any case, if you're really interested in this you need to write a new
BIP that extends 21. "Any syntax will do" does not help in implementation
:-)

Wladimir
Multiple recipients/amounts. Any syntax you like. Thanks!

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists•sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development

[-- Attachment #2: Type: text/html, Size: 1531 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] BIP 0021 idea: sendmany
  2013-05-22  8:46 ` Wladimir
@ 2013-05-22 18:01   ` shaker521
  2013-05-22 18:10   ` shaker521
  1 sibling, 0 replies; 4+ messages in thread
From: shaker521 @ 2013-05-22 18:01 UTC (permalink / raw)
  To: Wladimir; +Cc: Bitcoin Dev

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:<address>[:<amount>][/<label>][;<address>[:<amount>][/<label>]][?message=<message>]

As well as these examples:

bitcoin:Bitcoin+Foundation/1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW

bitcoin:eBook+Store/175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W:0.1;Bob+Author/1F4JfsqiDTG7vjnsz5daUrz2yexQGXB8uo:1.9?message=Purchased+eBook:+Bobgraphy

Brief testing with MultiBit shows that the URIs above are fully rejected by the client. This is the desired behavior for clients lacking support for multiple-output URIs. Thus we guard against the devastating failure mode outlined above.

Do you appreciate my work? Send a tip:
1F4JfsqiDTG7vjnsz5daUrz2yexQGXB8uo




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] BIP 0021 idea: sendmany
  2013-05-22  8:46 ` Wladimir
  2013-05-22 18:01   ` shaker521
@ 2013-05-22 18:10   ` shaker521
  1 sibling, 0 replies; 4+ messages in thread
From: shaker521 @ 2013-05-22 18:10 UTC (permalink / raw)
  To: Bitcoin Dev

>bitcoin:<address>[:<amount>][/<label>][;<address>[:<amount>][/<labe
>l>]][?message=<message>]

Correction:
bitcoin:[<label>/]<address>[:<amount>][;[<label>/]<address>[:<amount>]][?message=<message>]




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-22 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22  3:25 [Bitcoin-development] BIP 0021 idea: sendmany shaker521
2013-05-22  8:46 ` Wladimir
2013-05-22 18:01   ` shaker521
2013-05-22 18:10   ` shaker521

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox