Return-Path: Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 083EDC001A for ; Fri, 25 Feb 2022 12:48:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id F3AAB4012A for ; Fri, 25 Feb 2022 12:48:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.602 X-Spam-Level: X-Spam-Status: No, score=-1.602 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_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=protonmail.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V7F0CEEfDdcn for ; Fri, 25 Feb 2022 12:48:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by smtp2.osuosl.org (Postfix) with ESMTPS id 24DDC4000B for ; Fri, 25 Feb 2022 12:48:22 +0000 (UTC) Date: Fri, 25 Feb 2022 12:48:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1645793300; bh=/CSYmS98zxAAJVVSTlluOwcdKXD6BJ3eaHknMk3YzQQ=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=sk9Hu3P7Rc89gXfQkUhOXzmE2/6M22og4yavrEzcnRiJpfQhYk2gCLOuhsUqvMede W/adtr6jFj71x8Ze5e5EV37wKSlNCSe3uPo4LSUZ/q/XaIP1rUUIYHK2xwDoyMNjG1 wUkO7uTHQmbK4NGTTALO3xjhHqVJLWPSBn0fbADlyhib3FHDPmJJeg3Qp5l0wnGH4k fxKEmwb4si0OnHXkGS3s+B3uuZ1GQ3PERkbQd4CRm3U3xZivct7Iie4453Phe7cwZW yS+QiqAZPVw7+xusfw99Fk9xfLfde9DUHQXQVD6Gyplv1gwqHexyZKDJYatG0a00i1 zas5McmgsRCiA== To: Zac Greenwood From: ZmnSCPxj Reply-To: ZmnSCPxj Message-ID: In-Reply-To: References: <157744394-3dec42994f1798ce65b00e23b21ea656@pmq2v.m5r2.onet> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] OP_RETURN inside TapScript 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, 25 Feb 2022 12:48:24 -0000 Good morning Zac, > Hi ZmnSCPxj, > > To me it seems that more space can be saved. > > The data-=E2=80=9Ctransaction=E2=80=9D need not specify any output. The n= etwork could subtract the fee amount of the transaction directly from the s= pecified UTXO. That is not how UTXO systems like Bitcoin work. Either you consume the entire UTXO (take away the "U" from the "UTXO") comp= letely and in full, or you do not touch the UTXO (and cannot get fees from = it). > A fee also need not to be specified. Fees are never explicit in Bitcoin; it is always the difference between tot= al input amount minus the total output amount. > It can be calculated in advance both by the network and the transaction s= ender based on the size of the data. It is already implicitly calculated by the difference between the total inp= ut amount minus the total output amount. You seem to misunderstand as well. Fee rate is computed from the fee (computed from total input minus total ou= tput) divided by the transaction weight. Nodes do not compute fees from feerate and weight. > The calculation of the fee should be such that it only marginally cheaper= to use this new construct over using one or more transactions. For instanc= e, sending 81 bytes should cost as much as two OP_RETURN transactions (minu= s some marginal discount to incentivize the use of this more efficient way = to store data). Do you want to change weight calculations? *reducing* weight calculations is a hardfork, increasing it is a softfork. > If the balance of the selected UTXO is insufficient to pay for the data t= hen the transaction will be invalid. > > I can=E2=80=99t judge whether this particular approach would require a ha= rdfork, sadly. See above note, if you want to somehow reduce the weight of the data so as = to reduce the cost of data relative to `OP_RETURN`, that is a hardfork. Regards, ZmnSCPxj