Return-Path: Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id E4CDCC0177 for ; Fri, 28 Feb 2020 14:37:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CCC4986B74 for ; Fri, 28 Feb 2020 14:37:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NP7TPWzWKkux for ; Fri, 28 Feb 2020 14:37:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A353286B63 for ; Fri, 28 Feb 2020 14:37:26 +0000 (UTC) Received: by mail-oi1-f174.google.com with SMTP id q81so3070025oig.0 for ; Fri, 28 Feb 2020 06:37:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=MjCUQ0Xj6oR/NVsfBzmF80DRaC5JHfge1VZVFN4rNbg=; b=ll1+1b/7kMIzizMzgMmLhTEmWQUwDqdzAvy9ElGh8Y7UU7RwfVhBfaUzFGPwG8n+XQ M+qooX1U1mwDxz/2yGe2phQu1qXrztOsXi1WF4epSlgRG9O5lQT3Wt3UwZ9aF5nbChKf 7ccbdXCLqFlsaSmzDxtxRSH9XwYllIAE4VCHkgyJIr7UfngNSUmmO+gq9Z1yqrM+ZAZY 4w/obf112mJGhsW9zWofxlMIqOU6GyFTAWcUI1bW4+U1au4zeqY7cAjgk3JLcv9txoI2 ndRET2sa4DETNlzIhSSwvrFgBQXtEr01YTWQ+PzmJQQRWz4y71/79dI+7MxrnhoH2MpW hx1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MjCUQ0Xj6oR/NVsfBzmF80DRaC5JHfge1VZVFN4rNbg=; b=AFUOlgyKVD0RdBv6lUtodEPs+GdVlZCMj5LzEFs0wb4P02gKfgrlckvQ/QEHoMIFx9 6taCE5nkfSJZAjZ1GmfaW7pJPASvQFhCY4M5PgsyqvKOtSG317FaKvTyWEyN0onJc4zn E3vhbJ1r12jwjxGByl9TcDsQ/TcLp1mrx0PV9v0786xssWm7PCwlsbuFVNlVcmUX2sfe jRv14N4MDeR1J2cgLvIDKs7VyRazBRa6ZIggIJcJmbVfzQA63bTzQsIoWsb0VTyaoFA9 6g4ug8vxGqQ+O7Q4TKnZa22VVKfjMKG+n8UMmAJ5n6iOGhIqGSQlcSBu4j4V4N9rPLST 0+Mg== X-Gm-Message-State: APjAAAWdFS5U6TDrBQ+3Pbwk793HR94xp+7AUBBL+C5TYTo8K0kzUtjs 1uCX3LSkoOC4bA0jsRxwscZpXsc8VW97h+Izj6KBDtNn X-Google-Smtp-Source: APXvYqxiBVW7eJR94msYJEszCB3UbU746R2LvfOzRZbH/M4XGphI955svWb/mT6BXTLJCA0kZwv1K0Q8fNrlOqquF3s= X-Received: by 2002:aca:f305:: with SMTP id r5mr3470370oih.174.1582900645609; Fri, 28 Feb 2020 06:37:25 -0800 (PST) MIME-Version: 1.0 From: nopara73 Date: Fri, 28 Feb 2020 15:37:14 +0100 Message-ID: To: Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000b24730059fa3c60f" X-Mailman-Approved-At: Fri, 28 Feb 2020 14:44:16 +0000 Subject: [bitcoin-dev] [bitcin-dev] BIP157 Filter Type Extensibility Proposal for Combinations X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2020 14:37:28 -0000 --000000000000b24730059fa3c60f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable BIP157 defines a section called "Filter Types" ( https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#filter-types ) > For the sake of future extensibility and reducing filter sizes, there are multiple *filter types* that determine which data is included in a block filter as well as the method of filter construction/querying. In this model, full nodes generate one filter per block per filter type supported. > Each type is identified by a one byte code, and specifies the contents and serialization format of the filter. A full node MAY signal support for particular filter types using service bits. The initial filter types are defined separately in BIP 158 , and one service bit is allocated to signal support for them. While it provides a way to extend to multiple filter types, it does not provide a way to extend to filter type combinations. Such combinations are possible if the filter types would have to be defined with the power of two: 1, 2, 4, 8, 16..., so every octet of a byte array could denote a specific filter type, this way we could be able to signal for any number of combinations of those filter types. Originally this idea is described in more details and with code here: https://github.com/bitcoin/bitcoin/issues/18221 MarcoFalke suggested for me to submit it to the mailing list instead of a GitHub issue then propose an update to the BIP if consensus is reached. --=20 Best, =C3=81d=C3=A1m --000000000000b24730059fa3c60f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
BIP157 defines a section called "Filter Types" ( https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki= #filter-types=C2=A0)

>=C2=A0 For the sake of future e= xtensibility and reducing filter sizes, there are multiple=C2=A0filter ty= pes=C2=A0that determ= ine which data is included in a block filter as well as the method of filte= r construction/querying. In this model, full nodes generate one filter per = block per filter type supported.=C2=A0

>=C2=A0 Each type is identified = by a one byte code, and specifies the contents and serialization format of = the filter. A full node MAY signal support for particular filter types usin= g service bits. The initial filter types are defined separately in=C2=A0BIP 158, and one service bit is allocated to signal support for them.=C2=A0

While it provides a way to extend to multiple filter type= s, it does not provide a way to extend to filter type combinations. Such co= mbinations are possible if the filter types would have to be defined with t= he power of two: 1, 2, 4, 8, 16..., so every octet of a byte array could de= note a specific filter type, this way we could be able to signal for any nu= mber of combinations of those filter types.

Originally this idea is = described in more details and with code here:=C2=A0https://github.com/bitcoin/bitcoin/issu= es/18221=C2=A0

MarcoFalke suggested for me to submit it to the m= ailing list instead of a GitHub issue then propose an update to the BIP if = consensus is reached.

--
Best,
=C3=81d=C3=A1m
--000000000000b24730059fa3c60f--