Return-Path: Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9488FC0039 for ; Mon, 23 Oct 2023 11:11:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5C97B41EEA for ; Mon, 23 Oct 2023 11:11:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5C97B41EEA Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.a=rsa-sha256 header.s=protonmail3 header.b=rqEREPAH X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.599 X-Spam-Level: X-Spam-Status: No, score=-1.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FROM_LOCAL_NOVOWEL=0.5, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TL6uFOiigpwk for ; Mon, 23 Oct 2023 11:11:05 +0000 (UTC) Received: from mail-4319.protonmail.ch (mail-4319.protonmail.ch [185.70.43.19]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5095141F3B for ; Mon, 23 Oct 2023 11:11:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5095141F3B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1698059462; x=1698318662; bh=gouiLapoE4Gsoeib6NgOdGdLvqRd+ASfGoy37GlZHmA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=rqEREPAHG4F1KSpVoxQUOZB35sgGVijGvmGX75rIuKdu8K8eC7ajGx55rVS2YIkZ6 CWHp9s2ZjmrCdjFgWXjU+cuInYc4DaVB9h6I9aImbmDdqeBDKtuQ1zZUCks8UBjzvL I8kis/r30j+X+U/2CsugDxkg1+kAf9g7oPW+8xj9p/Brp4R24wvtPHCcpLKQr7bCtw RJ4zKFBHFnxGNRkNt9pv2Kqquxulr3BtPaTPfe6jaBD2tcnJEb8Hqc42piElNG1Wk4 8Omc/4S/TotCBJFq5qoAS7D0lSjDuL7S6GkE4uyU5VPfaLWVVjsV6lT0zZ2Xrpfob+ mmhgeGVa9EnrA== Date: Mon, 23 Oct 2023 11:10:56 +0000 To: Peter Todd From: ZmnSCPxj Message-ID: In-Reply-To: References: Feedback-ID: 2872618:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Bitcoin Protocol Discussion , security@ariard.me, "lightning-dev\\\\\\\\@lists.linuxfoundation.org" Subject: Re: [bitcoin-dev] [Lightning-dev] OP_Expire and Coinbase-Like Behavior: Making HTLCs Safer by Letting Transactions Expire Safely 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: Mon, 23 Oct 2023 11:11:08 -0000 Hi all, This was discussed partially on the platform formerly known as twitter, but= an alternate design goes like this: * Add an `nExpiryTime` field in taproot annex. * This indicates that the transaction MUST NOT exist in a block at or abo= ve the height specified. * Mempool should put txes buckets based on `nExpiryTime`, and if the bloc= k is reached, drop all the buckets with `nExpiryTime` less than that block = height. * Add an `OP_CHECKEXPIRYTIMEVERIFY` opcode, mostly similar in behavior to `= OP_EXPIRE` proposed by Peter Todd: * Check if `nExpiryTime` exists and has value equal or less than the stac= k top. The primary difference is simply that while Peter proposes an implicit fiel= d for the value that `OP_EXPIRE` will put in `CTransaction`, I propose an e= xplicit field for it in the taproot annex. The hope is that "explicit is better than implicit" and that the design wil= l be better implemented as well by non-Bitcoin-core implementations, as the= use of tx buckets is now explicit in treating the `nExpiryTime` field. Regards, ZmnSCPxj