From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z2mZt-0002Xw-N7 for bitcoin-development@lists.sourceforge.net; Wed, 10 Jun 2015 20:26:25 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.212.170 as permitted sender) client-ip=209.85.212.170; envelope-from=mh.in.england@gmail.com; helo=mail-wi0-f170.google.com; Received: from mail-wi0-f170.google.com ([209.85.212.170]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z2mZs-0005gX-KP for bitcoin-development@lists.sourceforge.net; Wed, 10 Jun 2015 20:26:25 +0000 Received: by wiwd19 with SMTP id d19so58826379wiw.0 for ; Wed, 10 Jun 2015 13:26:18 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.80.229 with SMTP id u5mr21927081wix.92.1433967978599; Wed, 10 Jun 2015 13:26:18 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.194.16.40 with HTTP; Wed, 10 Jun 2015 13:26:18 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Jun 2015 22:26:18 +0200 X-Google-Sender-Auth: xyxv8XbFTFHvtnVeP3JoKESDJtU Message-ID: From: Mike Hearn To: Nathan Wilcox Content-Type: multipart/alternative; boundary=f46d04428e40fbda3805182faffd X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -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 (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1Z2mZs-0005gX-KP Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] Proposal: SPV Fee Discovery mechanism 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, 10 Jun 2015 20:26:25 -0000 --f46d04428e40fbda3805182faffd Content-Type: text/plain; charset=UTF-8 I described an alternative way for SPV wallets to learn about fees some time ago. It requires a new transaction version that embeds output values into the signed data. Then an upgrade to the P2P protocol to send UTXO data along with transactions when they are relayed. The idea is that the wallet sets a Bloom filter with an FP rate that ensures it will see some random subset of all transactions being broadcast on the network, and with the extra data, it can calculate the fee paid. Once a transaction broadcast is observed the wallet includes that tx hash in its next Bloom filter, thus it can see which block the tx confirmed in. By measuring the amount of time that passed between a broadcast and it appearing in a block, it can calculate its own tables of fee paid:time taken. This has the advantage that you don't have to trust miners to publish data accurately. However it requires some protocol upgrades and of course, a lot of new code in SPV wallets. The way Bitcoin Wallet for Android handles fees currently is to just update a hard coded value every so often. --f46d04428e40fbda3805182faffd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I described an alternative way for SPV wallets to learn ab= out fees some time ago. It requires a new transaction version that embeds o= utput values into the signed data. Then an upgrade to the P2P protocol to s= end UTXO data along with transactions when they are relayed.

=
The idea is that the wallet sets a Bloom filter with an FP rate that e= nsures it will see some random subset of all transactions being broadcast o= n the network, and with the extra data, it can calculate the fee paid. Once= a transaction broadcast is observed the wallet includes that tx hash in it= s next Bloom filter, thus it can see which block the tx confirmed in. By me= asuring the amount of time that passed between a broadcast and it appearing= in a block, it can calculate its own tables of fee paid:time taken.
<= div>
This has the advantage that you don't have to trust = miners to publish data accurately. However it requires some protocol upgrad= es and of course, a lot of new code in SPV wallets.

The way Bitcoin Wallet for Android handles fees currently is to just upda= te a hard coded value every so often. --f46d04428e40fbda3805182faffd--