Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 3A2F6D3F for ; Fri, 13 Apr 2018 15:47:30 +0000 (UTC) X-Greylist: delayed 00:15:03 by SQLgrey-1.7.6 Received: from blaine.gmane.org (unknown [195.159.176.226]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A2537165 for ; Fri, 13 Apr 2018 15:47:29 +0000 (UTC) Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f70eR-0002GC-Et for bitcoin-dev@lists.linuxfoundation.org; Fri, 13 Apr 2018 17:30:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bitcoin-dev@lists.linuxfoundation.org From: Andreas Schildbach Date: Fri, 13 Apr 2018 17:32:15 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 X-Mozilla-News-Host: news://news.gmane.org:119 Content-Language: en-US X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, FORGED_MUA_MOZILLA,RDNS_NONE autolearn=no version=3.3.1 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [bitcoin-dev] BloomFilter issue with segwit addresses X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2018 15:47:30 -0000 Anton, a developer on the bitcoinj maiing list, recently made me aware [1] of a compatibility issue between segwit and BIP37 (Bloom Filtering). The issue affects only P2WPKH and the special case of transactions without change outputs (such as when emptying a wallet). In this case, neither inputs not outputs contain any data elements that would cause a match for the filter. The public key, which would match, goes to the witness but not to the input. My suggestion was to include an OP_RETURN output with a matching public key in such transactions. Anton confirmed that this workaround is indeed working. But of course it nullifies some of the segwit's size improvements. I wonder if Bitcoin Core would be willing to extend the BIP37 matching rules such that data elements in the witness are also matched against? [1] https://groups.google.com/d/msg/bitcoinj/SJpLgjowc1I/V7u2BavvAwAJ