Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 32013C000D for ; Thu, 9 Sep 2021 17:41:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2220C60AFC for ; Thu, 9 Sep 2021 17:41:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -4.517 X-Spam-Level: X-Spam-Status: No, score=-4.517 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, NICE_REPLY_A=-0.117, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=dashjr.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 74f0mSxPhK4w for ; Thu, 9 Sep 2021 17:41:54 +0000 (UTC) X-Greylist: delayed 00:05:10 by SQLgrey-1.8.0 Received: from zinan.dashjr.org (zinan.dashjr.org [IPv6:2001:470:88ff:2f::1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5779260ACA for ; Thu, 9 Sep 2021 17:41:53 +0000 (UTC) Received: from ishibashi.lan (unknown [12.153.231.201]) (Authenticated sender: luke-jr) by zinan.dashjr.org (Postfix) with ESMTPSA id EBA1B38A009B; Thu, 9 Sep 2021 17:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dashjr.org; s=zinan; t=1631209001; bh=jdWpSfRM3biSynMBVfTMeOoQqkTY8iR6PNS5a+ks7uw=; h=From:To:Subject:Date:References:In-Reply-To; b=hCwLy2nlTvM7tNuYo8qAUYa4bex85v2GW22nCSm5u35930+2/y5vlheM4MaGM0ntD ZWTooIrsmLd3F9gVZzL2Oi0pUoRKGS1NPmW3zReTXQEgzwcos2wxp6qz3WKopab+9e sD0r3BzYyf7Ro7kgQPwKIYRy4x/E9WlDX6smrizo= X-Hashcash: 1:25:210909:mrosset@bufio.org::5P7mrxM76gccDC0=:P/XH X-Hashcash: 1:25:210909:bitcoin-dev@lists.linuxfoundation.org::dw/ZoMo85nIH6OE8:bS2+P From: Luke Dashjr To: Mike Rosset , Bitcoin Protocol Discussion Date: Thu, 9 Sep 2021 17:36:17 +0000 User-Agent: KMail/1.9.10 References: <87r1dxbz4s.fsf@bufio.org> In-Reply-To: <87r1dxbz4s.fsf@bufio.org> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <202109091736.17891.luke@dashjr.org> Subject: Re: [bitcoin-dev] Clarification on the use of getblocktemplate RPC method. 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: Thu, 09 Sep 2021 17:41:55 -0000 https://github.com/bitcoin/libblkmaker/blob/master/blkmaker.c#L172 On Thursday 09 September 2021 12:54:18 Mike Rosset via bitcoin-dev wrote: > Hello all, > > I recently went down the bitcoin protocol rabbit hole. I wanted to use > GNU guile scheme to experiment with bitcoin. I initially started by > creating a toy bitcoin miner but I've run into some inconsistencies with > the documentation found on > https://en.bitcoin.it/wiki/Getblocktemplate. Namely with creating the > templates merkle root. > > From my understanding a coinbase transaction should have the > transactions data concatenated before creating the merkle root. But > getblocktemplate does not have a json cointbasetxn field. So I'm not > sure how to create a coinbase transaction without that. > > I have a test template response data found here. > https://raw.githubusercontent.com/mrosset/prospect/master/test-suite/data.j >son and using a modified version of the merkle python reference script found > on the wiki page. see > https://github.com/mrosset/prospect/blob/master/scripts/merkle.py . I'm > able to create a merkle root with the hash > c5fff939f628a04428c080ed5bd7cd9bc0b4722b2522743049adb18213adf28a but > that's minus the coinbase transaction. > > So far I'm able to replicate this hash using the test data in guile. But > I'd like to sanitize this so that I'm using a coinbase transaction and > making sure the python and guile merkle roots match. > > In short how do I get the coinbase transaction without the coinbasetxn > field existing? > > Mike > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev