Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1F973CC8 for ; Tue, 26 Jun 2018 16:58:20 +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 BA6E6774 for ; Tue, 26 Jun 2018 16:58:19 +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=bLTZW3DIDtvX4vEvNqeBh6OAgOAY3fOQHXm8rpzJMVs=; b=UNsQdTRL4d6LBtLX59mDipyQptM0ApVWKImSzAvx+2M29hURFudNdNEr4s0IlQ5Ne/7CNN95y7cod0YJt11bQ+cjlxA4OCuC/RG4iOoRIW5ilPOZTN53Hz+QD66BMiR0l+cRs152d0coelJ6kxsboi4ZZQkdnCuLzVtRhjPGh5ffnrEcGKqe3o96zXb5x/JXtOcduM7Jf9I6g6yVMwCYy0L2kr6Pe1XWsCmcFBfVQfZqwQxnd7w89hTueJCN/6igDzXnsrcXtmRmostNHDT1rDOUApAJQrssQ+ug+riLlcGNenUzsY7e+9+9xyhXozbTiyAtI8gQw55sytfgFueqoQ== Received: from jb55.com (S010660e327dca171.vc.shawcable.net [24.84.152.187]) by jb55.com (OpenSMTPD) with ESMTPSA id 4ed33647 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 26 Jun 2018 16:58:18 +0000 (UTC) From: William Casarin To: matejcik In-Reply-To: References: <21a616f5-7a17-35b9-85ea-f779f20a6a2d@satoshilabs.com> <20180621195654.GC99379@coinkite.com> Date: Tue, 26 Jun 2018 09:58:18 -0700 Message-ID: <87h8lpbi39.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: Tue, 26 Jun 2018 16:59:20 +0000 Cc: Bitcoin Protocol Discussion 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: Tue, 26 Jun 2018 16:58:20 -0000 matejcik via bitcoin-dev writes: > BIP174 is a ad-hoc format, simple to parse by hand; but that results > in _having to_ parse it by hand. In contrast, protobuf has a huge > collection of implementations that will do the job of sorting record > types into relevant struct fields, proper delimiting of records, etc. seems a bit overkill for how simple the format is, and pulling in a large dependency just for this is a bit silly. Although making it protobuf-compatible is an interesting idea, but I fear would be more work than is worth? I haven't looked closed enough at the protobuf encoding to be sure. > ...while at the same time, implementing "protobuf-based-BIP174" by > hand is roughly equally difficult as implementing the current BIP174. as a data point, I was able to build a simple serializer[1] in about an afternoon. I would much prefer to use this lib in say, clightning (my original goal), without having to have the larger protobuf dependency. Cheers, [1] https://github.com/jb55/libpsbt -- https://jb55.com