Return-Path: Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 917B5C004C for ; Fri, 7 Aug 2020 15:41:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 808CA885C1 for ; Fri, 7 Aug 2020 15:41:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GGUvFUEfTy6v for ; Fri, 7 Aug 2020 15:41:27 +0000 (UTC) X-Greylist: delayed 00:06:29 by SQLgrey-1.7.6 Received: from mail-oi1-f225.google.com (mail-oi1-f225.google.com [209.85.167.225]) by hemlock.osuosl.org (Postfix) with ESMTPS id A761188557 for ; Fri, 7 Aug 2020 15:41:27 +0000 (UTC) Received: by mail-oi1-f225.google.com with SMTP id u24so2274011oiv.7 for ; Fri, 07 Aug 2020 08:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotenna-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RfJEJdlQ8X36XzkCs0VICsNybYhvlQ058aY+VL1R66Q=; b=ENxuxCVVHWugx7f1UY98Wv4VxNL14hgVi1ZtMXmRzckF2+NCG9p9r8Hya2JpAUxCA1 Wjw1sdooOBlCCgocnZkGKPPHuCIeJ0lZC/p2mPZDujO9Dvsi8VEEPBDrQNa+d1SqWFac n6C3qlGvrekSCqNb6z5kLjGJj/iNpzJnEXDiCX0uhnKKOb4OTeEKsO6hqb0bGrGudDa1 Ww9UUA6R7ahBzb+96X/8fza+/z0cG9gZifld7JTQZciHLMh2oehA/qv5wKWhl97p83UD ztrSYSgJxyOVUgUFp2m7+hmkCZUm7GpZiSeTiJNY7LFgwuFMJgz53rJ4Rnkt4R7DG8rQ rpxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RfJEJdlQ8X36XzkCs0VICsNybYhvlQ058aY+VL1R66Q=; b=qLXz78Q/9IS9nkBIbLSyCWGt405705QjKNqSrQ0hVDrJT1vB2yizxHrbHmlkAVAVtF vwPOyDArhyBf+DylXvi3J/RaiDwSPbLhx5odfuzY5KJBJMM+wtwPnSdkvq3sJRnmVtKu 9FyxNhomCiKEOqH1LOPkjo4ju2GMIR+dwKnc/T/ZAO3F6p+xY0n2DZPP0SMTun4G3KBA audxbjl+r8V1TwSctBYrJZ1eUmwkPfC0rTu0C1IjoY/iXOOq+5S0AwsXfsLoRscaeATV S2WhgGt+ZvT7MVdzDl9gF2WJPho4ji5aly+42ZNWvfUNfSdl2M5NmIrmRbviYgORczeR a5tg== X-Gm-Message-State: AOAM532f2h9EeQd10EYsr8BhWX6bPN05eeZ87fwkZZnPvR2s4CyFoa+T xkTVmxlG3/vJKEIdbr7ikdHhrQ7Jb5tB2qD4bAJBWx8t6Qzoog== X-Google-Smtp-Source: ABdhPJzl43NLzmA+8i4ssneFaBKZpgymfPTJyheIAk/D4AfBcs075FbSe2QkGMYe89rC5Qx0/dRmVPGAMBHo X-Received: by 2002:aca:f38b:: with SMTP id r133mr11957290oih.81.1596814497697; Fri, 07 Aug 2020 08:34:57 -0700 (PDT) Received: from us2.smtp.exclaimer.net (us2.smtp.exclaimer.net. [104.209.35.28]) by smtp-relay.gmail.com with ESMTPS id l61sm880860otc.14.2020.08.07.08.34.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Aug 2020 08:34:57 -0700 (PDT) X-Relaying-Domain: gotenna.com Received: from mail-ej1-f71.google.com (209.85.218.71) by us2.smtp.exclaimer.net (104.209.35.28) with Exclaimer Signature Manager ESMTP Proxy us2.smtp.exclaimer.net (tlsversion=TLS12, tlscipher=TLS_ECDHE_WITH_AES256_SHA1); Fri, 7 Aug 2020 15:34:56 +0000 X-ExclaimerHostedSignatures-MessageProcessed: true X-ExclaimerProxyLatency: 15901472 X-ExclaimerImprintLatency: 437587 X-ExclaimerImprintAction: 3d2673e0da654bcc88b809743a559374 Received: by mail-ej1-f71.google.com with SMTP id t9so1037369ejx.22 for ; Fri, 07 Aug 2020 08:34:55 -0700 (PDT) X-Received: by 2002:a17:906:eca4:: with SMTP id qh4mr9658128ejb.255.1596814494062; Fri, 07 Aug 2020 08:34:54 -0700 (PDT) X-Received: by 2002:a17:906:eca4:: with SMTP id qh4mr9658113ejb.255.1596814493858; Fri, 07 Aug 2020 08:34:53 -0700 (PDT) MIME-Version: 1.0 References: <735E5B6A-785E-408B-8658-FA36200923C7@mattcorallo.com> <94bb2092-6d53-0e46-45ac-a1f8e04dafba@mattcorallo.com> In-Reply-To: <94bb2092-6d53-0e46-45ac-a1f8e04dafba@mattcorallo.com> From: Richard Myers Date: Fri, 7 Aug 2020 17:34:43 +0200 Message-ID: To: Matt Corallo , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000add92d05ac4b5806" X-Mailman-Approved-At: Fri, 07 Aug 2020 15:47:01 +0000 Subject: Re: [bitcoin-dev] BIP 118 and SIGHASH_ANYPREVOUT 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, 07 Aug 2020 15:41:28 -0000 --000000000000add92d05ac4b5806 Content-Type: text/plain; charset="UTF-8" When you say that a special relay network might be more "smart about replacement" in the context of ANYPREVOUT*, do you mean these nodes could RBF parts of a package like this: Given: - Package A = UpdateTx_A(n=1): txin: AnchorTx, txout: SettlementTx_A(n=1) -> HtlcTxs(n=1)_A -> .chain of transactions that pin UpdateTx_A(n=1) with high total fee, etc. And a new package with higher fee rate versions of ANYPREVOUT* transactions in the package, but otherwise lower total fee: - Package B = UpdateTx_B(n=1): txin: AnchorTx, txout: SettlementTx_B(n=1) -> HtlcTxs(n=1)_B -> low total fee package Relay just the higher up-front fee-rate transactions from package B which get spent by the high absolute fee child transactions from package A: - Package A' = UpdateTx_B(n=1): txin: AnchorTx, txout: SettlementTx_B(n=1) -> HtlcTxs(n=1)_A -> ...chain of up to 25 txs that pin UpdateTx(n=1) with high total fee, etc. On Thu, Aug 6, 2020 at 5:59 PM Matt Corallo via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > In general, SIGHASH_NOINPUT makes these issues much, much simpler to > address, but only if we assume that nodes can > somehow be "smart" about replacement when they see a SIGHASH_NOINPUT spend > which can spend an output that something else > in the mempool already spends (potentially a different input than the > relaying node thinks the transaction should > spend). While ideally we'd be able to shove that (significant) complexity > into the Bitcoin P2P network, that may not be > feasible, but we could imagine a relay network of lightning nodes doing > that calculation and then passing the > transactions to their local full nodes. --000000000000add92d05ac4b5806 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When you say that a special relay network might be mo= re "smart about replacement" in the context of ANYPREVOUT*, do yo= u mean these nodes could RBF parts of a package like this:

Given:
=C2=A0- Package A =3D UpdateTx_A(n=3D1): = txin: AnchorTx, txout: SettlementTx_A(n=3D1) -> HtlcTxs(n=3D1)_A -> .= chain of=C2=A0 transactions that pin UpdateTx_A(n=3D1) with high total fee,= etc.
=

And a new package with higher = fee rate versions of ANYPREVOUT* transactions in the package, but otherwise= lower total fee:

=C2=A0- Package B =3D UpdateTx_B(n=3D1= ): txin: AnchorTx, txout: SettlementTx_B(n=3D1) ->=C2=A0HtlcTxs(n=3D1)_B= -> low total fee package

Relay just=C2= =A0the higher up-front fee-rate transactions from package B which get spent= by the high absolute fee child transactions from package A:

=C2=A0- Package A' =3D=C2=A0UpdateTx_B(n=3D1): txin: A= nchorTx, txout: SettlementTx_B(n=3D1) -> HtlcTxs(n=3D1)_A -> ...chain= of up to 25 txs that pin UpdateTx(n=3D1) with high total fee, etc.

On Thu, Aug 6, 2020 at 5:59 PM Matt Corallo via bitcoin-dev <bit= coin-dev@lists.linuxfoundation.org> wrote:
In general, SIGHASH_NOINPUT makes these issues much, much simpler to addres= s, but only if we assume that nodes can
somehow be "smart" about replacement when they see a SIGHASH_NOIN= PUT spend which can spend an output that something else
in the mempool already spends (potentially a different input than the relay= ing node thinks the transaction should
spend). While ideally we'd be able to shove that (significant) complexi= ty into the Bitcoin P2P network, that may not be
feasible, but we could imagine a relay network of lightning nodes doing tha= t calculation and then passing the
transactions to their local full nodes.=C2=A0

--000000000000add92d05ac4b5806--