<oembed><type>rich</type><version>1.0</version><author_name>npub17ty4mumkv43w8wtt0xsz2jypck0gvw0j8xrcg6tpea25z2nh7meqf4qgyd</author_name><author_url>https://nostr.ae/npub17ty4mumkv43w8wtt0xsz2jypck0gvw0j8xrcg6tpea25z2nh7meqf4qgyd</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2013-12-01&#xA;📝 Original message:Lately I was pondering how to make floating fees and SPV wallets work well&#xA;together.&#xA;&#xA;I propose the following plan:&#xA;&#xA;1) 0.9 ships with something dead simple, like a command to query what a&#xA;node estimates and then clients just take the average, or cross-check a&#xA;centralised estimate against the P2P network. It&#39;s fast to implement and&#xA;simple, but not very secure or decentralised. However it will allow the&#xA;feature to launch on some kind of reasonable timeframe.&#xA;&#xA;2) We bump the protocol version and the tx message now gets an optional&#xA;protobuf buffer stuck on the end. The first thing put in this protobuf is a&#xA;list of the values of the inputs. Using this data, the fee paid by a&#xA;transaction can be calculated. In step 2 the data is unauthenticated.&#xA;&#xA;3) Some SPV wallets already set themselves up so that they sync with the&#xA;network in the background, e.g. the Android wallet syncs at least every 24&#xA;hours. This should become more common, using scheduler capabilities built&#xA;into most operating systems. When the wallet syncs with the network, it&#xA;sets a deliberately very noisy Bloom filter on its peers and waits around&#xA;for 30-60 seconds or so. The wallet observes some of the broadcasts taking&#xA;place and records the hashes and associated fees that were paid to disk.&#xA;Next time it syncs, it includes the observed hashes into the Bloom filter&#xA;used to download the chain, and thus learns how quickly they confirmed. It&#xA;can calculate its own fee estimate from that.&#xA;&#xA;4) Finally, when we next hard fork, we make v2 transactions include the&#xA;output value in the signature, same as the output script (this proposal has&#xA;been on the forums for a while now). That allows the fee data added in step&#xA;2 to be cross-checked against the signatures on the inputs, thus&#xA;authenticating it.&#xA;&#xA;&#xA;I think this is a small and easy set of steps that would make it quite hard&#xA;to attack - malicious nodes could make it appear that some transactions&#xA;never confirmed thus seeming to force the price up, but it&#39;s easy to simply&#xA;exclude transactions which never confirm at all from the calculations. Plus&#xA;of course you can cross-check nodes against each other to try and catch&#xA;nodes that are failing to match transactions properly.&#xA;&#xA;One obvious concern is what to do if nodes don&#39;t converge on very similar&#xA;estimates. Wallets will always want to pay the lowest fee possible, so that&#xA;means they&#39;ll always be riding the very edge of what&#39;s acceptable, opening&#xA;up tx propagation to random flaky failures if fee estimates change whilst a&#xA;transaction is in progress, or if some nodes don&#39;t calculate the same&#xA;estimates as others.&#xA;&#xA;If a wallet gets a reject message for a tx that has a fee that are by its&#xA;own estimates acceptable, what should it do? What if only some nodes report&#xA;that and others don&#39;t?&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20131201/d06702fb/attachment.html&gt;</html></oembed>