Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 11661CEA for ; Wed, 27 Jun 2018 06:09:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from jb55.com (jb55.com [45.79.91.128]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id ADA1817E for ; Wed, 27 Jun 2018 06:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d= jb55.com; h=from:to:subject:date:message-id; s=default; bh=50qXm9SULuDJ2lIDtq2Ag2MTjYy0PoS+xui1G+Po9r0=; b=X2g2oU8d2OtINQDWClZfm9Nx7fwWhEZGghxm1G+pkJJHqYJdBwf+dtEXrgLmyGVoJxqS+cgBeRzrxQRu2OcdJK/m7DE4PSOXov9qzCxr9jNVsZVLqYPcoP6Ghb9v3fyNk76p1EusXgCr9n4N4fK+lbJ6CupXjQtILzM7PNkNbR+N/MEgB05Rb0+FJGZogS2JHkgD2xQ49cGAfMi6HYLf9Wd2DEerhIofFvcchK6W052EGxhrZZsQ99vzJor4WvI0d2UPzDIZRg+BAPMeiyaQXcJzoCsOPu0/KtlLoU/6h0DehigiQ3iVHUjiPyDiFTrUTDpqvrN/3h+fbVz2p0mxSw== Received: from jb55.com (S010660e327dca171.vc.shawcable.net [24.84.152.187]) by jb55.com (OpenSMTPD) with ESMTPSA id 5113f4fc TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Wed, 27 Jun 2018 06:09:09 +0000 (UTC) From: William Casarin To: Achow101 , Bitcoin Protocol Discussion In-Reply-To: References: <21a616f5-7a17-35b9-85ea-f779f20a6a2d@satoshilabs.com> <20180621195654.GC99379@coinkite.com> Date: Tue, 26 Jun 2018 23:09:09 -0700 Message-ID: <87k1qk7oca.fsf@jb55.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Wed, 27 Jun 2018 09:27:31 +0000 Subject: Re: [bitcoin-dev] BIP 174 thoughts 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: Wed, 27 Jun 2018 06:09:11 -0000 Hey Andrew, If I'm reading the spec right: the way it is designed right now, you could create hundreds of thousands of zero bytes in the input or output key-value arrays. As far as I can tell this would be considered valid, as it is simply a large array of empty dictionaries. Is this right? I'm worried about buffer overflows in cases where someone sends a large blob of zeros to an unsuspecting implementation. Also, the extensibility section reads: > Additional key-value maps with different types for the key-value pairs > can be added on to the end of the format. "different types for the key-value pairs", is this referring to new types beyond the current global, input and output types? > The number of each map that follows must be specified in the globals > section Is this out of date? Since there is only one type in the global section now (tx). > so that parsers will know when to use different definitions of the > data types I'm not sure what this means. Thanks! Will -- https://jb55.com