From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 25C5EE9A for ; Mon, 28 May 2018 19:24:12 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-ua0-f176.google.com (mail-ua0-f176.google.com [209.85.217.176]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6B00A102 for ; Mon, 28 May 2018 19:24:11 +0000 (UTC) Received: by mail-ua0-f176.google.com with SMTP id j5-v6so8469464uak.12 for ; Mon, 28 May 2018 12:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=YTNAqA+GqjfTaxxlW64O6QGAh3kkl+O0sIVNuG3/zfc=; b=AsOPA87Rwfgk7ff9dJ9/vImJUBDzBV4Y6/gF6Y6dWkopAAg7jz8ZJ5FNO1l6UMU1UN Wr8Y0g7YrAFn91jTooFVWeuGjLNYWEC4S5jm/5TNiI93TX5Yy/ycf6QBPH7g4Uu0UPLw 2ror39DM30oBWuWwd4kWDCeUcfrwmIPSZPU4oZPSFVXJ3hOputXLDa70HcDwmrtr/zlO jgcKL7Jeqn81Z2yJ7K4QuqVHE1eWmUibONKDd79A4iHKQPYrOCn/xMtWaPNEruNKQD4/ XbQ6fqzUum37Am5nLr/Zvn1pKVdxQKxnA6UKsjiFf5Jfsu1YPmiKtUa4wliLwVmYqDdN RrRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=YTNAqA+GqjfTaxxlW64O6QGAh3kkl+O0sIVNuG3/zfc=; b=TKUpxs+2yt3lR+6reQFgLViS/l/PjluIMNAvNa5Fvdly1X0k+OPzVhkyExJAkQFIbt TG0Sce5PZAiWEJ9abWPfkyUjT5yShElEOCPkMFjowyY+M3bLRTqJ7HDkUjWxmkzK4HY9 7F7bC73uuqCfHsRguu0GZ1ernVGF5DwYE2GVtEkzRXwgTXAAiM6Mvi+rw1Fh7rYk/X+O +zl8ALeYWQiwZAY1T2QUzWrBleIjhjs7IK2LqBKoWBX4CCKFk8BriJilT0N5mp7p7vHx DNxWFviFSdQucah3cZVv8DKmEEU9x1PygrqheKVNtT/3TP/wR2gAPAGxX5A80dGWajyk p47w== X-Gm-Message-State: ALKqPwdC+o+kCFTyWezl92OgXwd2k5hAzOny4zBNRK3Q6r30iAFf0YrL z4HbOjERzJkgPjSI2jTXemN02ggBaVt23Zko1+E= X-Google-Smtp-Source: ADUXVKKr73zKRqsYRGzEcBI98bpBfVePkM3AFXzdfs+AzFrNM/xyOTYjyC+gmHHSdn5M8ZP75P1JxA3tUd7xXU3alSk= X-Received: by 2002:ab0:18ee:: with SMTP id d46-v6mr4008403uah.39.1527535450496; Mon, 28 May 2018 12:24:10 -0700 (PDT) MIME-Version: 1.0 Sender: gmaxwell@gmail.com Received: by 2002:a67:5193:0:0:0:0:0 with HTTP; Mon, 28 May 2018 12:24:09 -0700 (PDT) In-Reply-To: References: <22d375c7-a032-8691-98dc-0e6ee87a4b08@mattcorallo.com> <7E4FA664-BBAF-421F-8C37-D7CE3AA5310A@gmail.com> From: Gregory Maxwell Date: Mon, 28 May 2018 19:24:09 +0000 X-Google-Sender-Auth: _IajEZw1IYSW2UmSa00pByRRlOs Message-ID: To: Tamas Blummer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] BIP 158 Flexibility and Filter Size 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: Mon, 28 May 2018 19:24:12 -0000 Is there an application that requires watching for output scripts that doesn't also require watching for input scrips (or, less efficiently, input outpoints)? Any of the wallet application that I'm aware of need to see coins being spent as well as created, else they may try to spend already spent coins. If we're not aware of any applications that wouldnt use both, there isn't much reason to separate them and if input scripts are used instead of input outpoints there is additional savings from combining them (due to the same scripts being spent as were created in the block-- due to reuse and chaining). I still am of the belief, based on Matt's argument, that there is no use for txid what-so-ever (instead just watch for an outpoint). On Mon, May 28, 2018 at 6:28 PM, Tamas Blummer wr= ote: > Forgot to mention: The link I sent is to a branch that is patched to prod= uce the filter stats. > This is the main project and the BIP158 implementation: https://github.co= m/rust-bitcoin/rust-bitcoin-spv/blob/master/src/blockfilter.rs > > Tamas Blummer > >> On May 28, 2018, at 20:18, Tamas Blummer wrote= : >> >> Hi Jim, >> >> A =E2=80=9Cbasic=E2=80=9D combined filter would mean up to 0.5 GB filter= data per month (with 100% segwith use). Considering that 1 GB is the usual= data quota for an entry level mobile phone contract, this could be a too h= igh barrier for adoption. >> >> I repeated your calculations and produced a slightly different graph tha= t shows the fraction of cummulative filter size to cummulative blockchain s= ize. This is less noisy but otherwise confirms your measurement. >> >> I think that the data supports separation of filters as a combined filte= r does not seem to come with significant savings. (basic size ~=3D txid + = input points + output scripts sizes) >> >> My calculations are repeatable with: >> >> https://github.com/tamasblummer/rust-bitcoin-spv/blob/blockfilterstats/s= rc/bin/blockfilterstats.rs >> >> that is using a Rust implementation of an SPV client built on top of oth= er libraries we work on in the rust-bitcoin GitHub community (https://githu= b.com/rust-bitcoin). Yes, this is a shameles plug for the project hoping to= attract more developer. >> >> Tamas Blummer >> >> >> >> >>> On May 24, 2018, at 05:48, Jim Posen via bitcoin-dev wrote: >>> >>> Greg, I've attached a graph including the input scripts. >>> >>> In the top graph, we can see how the input script filter compares to th= e input outpoint filter. It is definitely smaller as a result of address re= use. The bottom graph shows the ratio over time of combining the input prev= script and output script filters vs keeping them separate. In more recent = blocks, it appears that there are decreasing savings. >>> >> >