summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFractal Encrypt <fractalencryptlsd@gmail.com>2024-05-04 08:00:07 -0700
committerbitcoindev <bitcoindev@googlegroups.com>2024-05-04 08:40:31 -0700
commiteb935da7f4e43e6636a463f1e1205a121e1b9a20 (patch)
tree9bf7f70e2bb99bb47a564887794ba2d52e5dd5bf
parent1d942b2c24ace29da2d2296ddc84273df78cb330 (diff)
downloadpi-bitcoindev-eb935da7f4e43e6636a463f1e1205a121e1b9a20.tar.gz
pi-bitcoindev-eb935da7f4e43e6636a463f1e1205a121e1b9a20.zip
[bitcoindev] A Fool's Errand or should I try?
-rw-r--r--7d/421b0f03e221d3e00a528b8c1599227fbd0698221
1 files changed, 221 insertions, 0 deletions
diff --git a/7d/421b0f03e221d3e00a528b8c1599227fbd0698 b/7d/421b0f03e221d3e00a528b8c1599227fbd0698
new file mode 100644
index 000000000..67b4943da
--- /dev/null
+++ b/7d/421b0f03e221d3e00a528b8c1599227fbd0698
@@ -0,0 +1,221 @@
+Delivery-date: Sat, 04 May 2024 08:40:31 -0700
+Received: from mail-yb1-f190.google.com ([209.85.219.190])
+ by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
+ (Exim 4.94.2)
+ (envelope-from <bitcoindev+bncBCKI7BNCZUJBBZ5N3GYQMGQE245DPQI@googlegroups.com>)
+ id 1s3HV0-0006Ka-Lo
+ for bitcoindev@gnusha.org; Sat, 04 May 2024 08:40:31 -0700
+Received: by mail-yb1-f190.google.com with SMTP id 3f1490d57ef6-de5a8638579sf1376571276.1
+ for <bitcoindev@gnusha.org>; Sat, 04 May 2024 08:40:30 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=googlegroups.com; s=20230601; t=1714837224; x=1715442024; darn=gnusha.org;
+ h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
+ :list-id:mailing-list:precedence:x-original-sender:mime-version
+ :subject:message-id:to:from:date:sender:from:to:cc:subject:date
+ :message-id:reply-to;
+ bh=nP2n7Ei2uXToiQ5Lj5tM//G4jxMRaUXKwtD4W8Zq4Ls=;
+ b=bu9LV46Gui5P9waV4zrgGsMWio+LNHw5ldjG27k/Fy4W8ejzZ2T7s0LRPyBmGzuBy5
+ o/Fy115oPGy6ooTm5wXkCxzD1mxKTNsY/feQNaQzjRDt7isQEgqy84qQH12KexU0AvdY
+ V30QaF/rGTRr7ncG2SUNcrQpBOAt5cJv5QomL88RLeK0nhghPaMBf1sEt61f4k1Xvr7c
+ /9Ls1gpeGN4H44yryKwQDmCzY6OebwzjTOcyJL9llqWSoBngmsC4ZvsvMtpW6PVDpaBv
+ Wsqs/TXbyCcRcFG1+DwsK9E+XMNwL9KqK27TBJhL8cGVNQ+guoiOv/d4x228r15Bu4At
+ 8ZCw==
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=gmail.com; s=20230601; t=1714837224; x=1715442024; darn=gnusha.org;
+ h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
+ :list-id:mailing-list:precedence:x-original-sender:mime-version
+ :subject:message-id:to:from:date:from:to:cc:subject:date:message-id
+ :reply-to;
+ bh=nP2n7Ei2uXToiQ5Lj5tM//G4jxMRaUXKwtD4W8Zq4Ls=;
+ b=ZVuBczmof4Fi7HJ+r+t3jzXKXUJPGvWuMdWUXAzWG4+vVHqpr7yXuysDVizyn0r8hJ
+ UrixPHpDDsRMEF+yhyV/6dCEaw6L29+zXyWrGpjvLES1fC61Cq1CUN8xB5Eed1ZNoOxW
+ W5pppJ1MZrhw7o6OkUpIGoQmEfiiHCLbonopbiN5PLTkXQYzivxwuzQJvf74B9GFp7+L
+ v41nWBHcm1Buce3IflGELH1fZy+tHL1pCnHnc+PrcaaUyHOBS+cQbK7cUP+4i2GEfSQP
+ N/dMt0lb9YtIgZ46KmEvNa32gY86KY0data3SGFqIs0mjL1XRAyJRz1Re9ylnOLMntmx
+ g6yw==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=1e100.net; s=20230601; t=1714837224; x=1715442024;
+ h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
+ :list-id:mailing-list:precedence:x-original-sender:mime-version
+ :subject:message-id:to:from:date:x-beenthere:x-gm-message-state
+ :sender:from:to:cc:subject:date:message-id:reply-to;
+ bh=nP2n7Ei2uXToiQ5Lj5tM//G4jxMRaUXKwtD4W8Zq4Ls=;
+ b=TwEkB182lwnFIhAinXPVg5IsBWrJDljv+ZGIi2klSk9Ja30mIfZ8iGigstRlr9j6FN
+ X4XsfRZi5D1En2zCDISZhFTLShPgqstQNnr/3dQ6UqpqxEeHsjR0rxDi03VYH3+TxeCg
+ MBHnS7KLdw+btb4c2HaOQsTBVBHTIpoqMQxS9TvadHxYMDJpgQ6n7dVELu8EvBXQLc/B
+ TfU1SfzlUQcgdRW9NzwXrrzmP2T3LbeVShZI9wXtDPjNMkoXuqLf9wOvH2wgdyd44JQJ
+ 6dxG/oJVmk25lFzX0Sn6mz/LMp1UdDapJM1ChPWOEIaPhfn53yEIg4Yd6ne2EhqVYv08
+ EjHw==
+Sender: bitcoindev@googlegroups.com
+X-Forwarded-Encrypted: i=1; AJvYcCU5Y49/0f4V0nBRF74g2TStPKYCXCdIJ5WFPd9FR1nGhP+4zFaS3Uofkt5b/wpI8gFseqotDZbpXOitlem074ZGgN3pHas=
+X-Gm-Message-State: AOJu0YyeJecBzjOX2KbvaIhRZ7PhzokBXKaDlJphMuq3vAlshnxx9Ugq
+ ucV3isCRXFcAb7zkVHMf2ka076tm4sj9OJa4E0vDXpcdAImNMadd
+X-Google-Smtp-Source: AGHT+IEDw3Geo9StDtl/GU2REZ2ME7WRdfRaniY3OPWZYCyUxZfFlmfs834ZZgFXkTqB8jQJoEXI3A==
+X-Received: by 2002:a25:7446:0:b0:de5:5040:ea12 with SMTP id p67-20020a257446000000b00de55040ea12mr6712874ybc.32.1714837224470;
+ Sat, 04 May 2024 08:40:24 -0700 (PDT)
+X-BeenThere: bitcoindev@googlegroups.com
+Received: by 2002:a25:ac19:0:b0:dcc:37ed:efb1 with SMTP id 3f1490d57ef6-de8b54f938els551488276.2.-pod-prod-00-us;
+ Sat, 04 May 2024 08:40:22 -0700 (PDT)
+X-Received: by 2002:a05:6902:2192:b0:de6:569:325c with SMTP id dl18-20020a056902219200b00de60569325cmr2124039ybb.4.1714837222771;
+ Sat, 04 May 2024 08:40:22 -0700 (PDT)
+Received: by 2002:a05:690c:d8a:b0:620:26bb:319f with SMTP id 00721157ae682-62026bb31f1ms7b3;
+ Sat, 4 May 2024 08:00:09 -0700 (PDT)
+X-Received: by 2002:a05:690c:d8c:b0:61b:e2e9:b59c with SMTP id da12-20020a05690c0d8c00b0061be2e9b59cmr1346765ywb.4.1714834808033;
+ Sat, 04 May 2024 08:00:08 -0700 (PDT)
+Date: Sat, 4 May 2024 08:00:07 -0700 (PDT)
+From: Fractal Encrypt <fractalencryptlsd@gmail.com>
+To: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
+Message-Id: <75628135-32ae-4df3-be52-9f7d054bc096n@googlegroups.com>
+Subject: [bitcoindev] A Fool's Errand or should I try?
+MIME-Version: 1.0
+Content-Type: multipart/mixed;
+ boundary="----=_Part_1712_337132614.1714834807661"
+X-Original-Sender: fractalencryptlsd@gmail.com
+Precedence: list
+Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com
+List-ID: <bitcoindev.googlegroups.com>
+X-Google-Group-Id: 786775582512
+List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com>
+List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com>
+List-Archive: <https://groups.google.com/group/bitcoindev
+List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com>
+List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>,
+ <https://groups.google.com/group/bitcoindev/subscribe>
+X-Spam-Score: -0.5 (/)
+
+------=_Part_1712_337132614.1714834807661
+Content-Type: multipart/alternative;
+ boundary="----=_Part_1713_833547110.1714834807661"
+
+------=_Part_1713_833547110.1714834807661
+Content-Type: text/plain; charset="UTF-8"
+
+TLDR: I'd like to investigate the possibilities of extending
+decoderawtransaction to include the fee (and maybe even sats per v/b).
+
+I'm hoping it will be a good project for me to work on and build at least a
+tiny understanding of bitcoin development.
+
+------------------------------------------------------------------------
+
+I use the createrawtransaction function to create transactions, and before
+broadcasting, I always like to use decoderawtransaction to see if I made
+any mistakes.
+
+I've sometimes messed up on the fee calculation, as I do that myself with a
+calculator.
+
+Unfortunately decoderawtransaction doesn't give me the fee information (for
+a very good reason, it is not aware of the value of the inputs in the tx).
+
+So to double check the fees, instead of using createrawtransaction, I'll
+use createpsbt and then go through the process of finalizing it so I can
+run decodepsbt, which does give the fee along with all the other relevant
+data.
+
+But the createpsbt process is more work for a simple transaction where all
+UTXOs are in the wallet I am creating the rawtx in.
+
+My goal would be to modify decoderawtransaction to perform these additional
+steps:
+
+ 1. Fetch UTXO details for each input.
+ 2. Calculate the total input value.
+ 3. Subtract the total output value to determine the fee.
+
+Additionally there are the considerations about whether the inputs in the
+transaction are in your wallet or not.
+
+If I run listunspent it gives me the info I need to create the raw tx or
+psbt, and it has the values of the UTXOs that will be used as inputs in my
+tx.
+
+But I understand decoderawtransaction is meant to be used whether or not
+the keys are in your wallet (so I was thinking to make a command argument
+T/F to show the fee value only if keys are in your wallet).
+
+Alternatively if you are running the command in a node with txindex, then
+you have the full chainstate to look up txids (whether unspent or not) - so
+this needs to be addressed too.
+
+Doing this within my own node would be cool enough and I don't necessarily
+need it to go farther than that. However if I do get it working, I'd
+certainly try to submit a PR.
+
+I have no idea if any of this is possible, so I wanted to ask here for some
+guidance and maybe mentorship in this self-interest driven project. Also
+looking for this to be shot down mercilessly if it's just ridiculous.
+
+My abilities and skills are very low. My interest and persistence are high.
+
+Any help or ridicule invited ;)
+
+--
+You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
+To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
+To view this discussion on the web visit https://groups.google.com/d/msgid/bitcoindev/75628135-32ae-4df3-be52-9f7d054bc096n%40googlegroups.com.
+
+------=_Part_1713_833547110.1714834807661
+Content-Type: text/html; charset="UTF-8"
+Content-Transfer-Encoding: quoted-printable
+
+<div>TLDR: I'd like to investigate the possibilities of extending decoderaw=
+transaction to include the fee (and maybe even sats per v/b).</div><div><br=
+ /></div><div>I'm hoping it will be a good project for me to work on and bu=
+ild at least a tiny understanding of bitcoin development.</div><div><br /><=
+/div><div>-----------------------------------------------------------------=
+-------<br /></div><div><br /></div><div>I use the createrawtransaction fun=
+ction to create transactions, and before broadcasting, I always like to use=
+ decoderawtransaction to see if I made any mistakes.</div><div><br /></div>=
+<div>I've sometimes messed up on the fee calculation, as I do that myself w=
+ith a calculator.</div><div><br /></div><div>Unfortunately decoderawtransac=
+tion doesn't give me the fee information (for a very good reason, it is not=
+ aware of the value of the inputs in the tx).</div><div><br /></div><div>So=
+ to double check the fees, instead of using createrawtransaction, I'll use =
+createpsbt and then go through the process of finalizing it so I can run de=
+codepsbt, which does give the fee along with all the other relevant data.<b=
+r /></div><div><br /></div><div>But the createpsbt process is more work for=
+ a simple transaction where all UTXOs are in the wallet I am creating the r=
+awtx in.</div><div><br /></div><div>My goal would be to modify <span>decode=
+rawtransaction</span> to perform these additional steps:<ol><li>Fetch UTXO =
+details for each input.</li><li>Calculate the total input value.</li><li>Su=
+btract the total output value to determine the fee.</li></ol><div>Additiona=
+lly there are the considerations about whether the inputs in the transactio=
+n are in your wallet or not. <br /></div><div><br /></div><div>If I run lis=
+tunspent it gives me the info I need to create the raw tx or psbt, and it h=
+as the values of the UTXOs that will be used as inputs in my tx.<br /><br /=
+>But I understand decoderawtransaction is meant to be used whether or not t=
+he keys are in your wallet (so I was thinking to make a command argument T/=
+F to show the fee value only if keys are in your wallet).<br /><br />Altern=
+atively if you are running the command in a node with txindex, then you hav=
+e the full chainstate to look up txids (whether unspent or not) - so this n=
+eeds to be addressed too.</div><div><br /></div><div>Doing this within my o=
+wn node would be cool enough and I don't necessarily need it to go farther =
+than that. However if I do get it working, I'd certainly try to submit a PR=
+.<br /></div><div><br />I have no idea if any of this is possible, so I wan=
+ted to ask here for some guidance and maybe mentorship in this self-interes=
+t driven project. Also looking for this to be shot down mercilessly if it's=
+ just ridiculous.</div><div><br /></div><div>My abilities and skills are ve=
+ry low. My interest and persistence are high.</div><div><br /></div><div>An=
+y help or ridicule invited ;)<br /></div>
+
+</div>
+
+<p></p>
+
+-- <br />
+You received this message because you are subscribed to the Google Groups &=
+quot;Bitcoin Development Mailing List&quot; group.<br />
+To unsubscribe from this group and stop receiving emails from it, send an e=
+mail to <a href=3D"mailto:bitcoindev+unsubscribe@googlegroups.com">bitcoind=
+ev+unsubscribe@googlegroups.com</a>.<br />
+To view this discussion on the web visit <a href=3D"https://groups.google.c=
+om/d/msgid/bitcoindev/75628135-32ae-4df3-be52-9f7d054bc096n%40googlegroups.=
+com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msg=
+id/bitcoindev/75628135-32ae-4df3-be52-9f7d054bc096n%40googlegroups.com</a>.=
+<br />
+
+------=_Part_1713_833547110.1714834807661--
+
+------=_Part_1712_337132614.1714834807661--
+