-
Notifications
You must be signed in to change notification settings - Fork 37.7k
doc: Add offline signing tutorial #28363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
fd4366b
to
de9a0f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concept ACK de9a0f7
Left a few comments - I think the complexity can be reduced to make it more practical for actual mainnet users as opposed to a purely educational exercise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @BrandonOdiwuor
Gave it a first pass too, and agree with many of @pinheadmz comments. I think removing the online wallet would remove a load of steps and make things easier to follow.
Later today I will try and manually test the steps myself using a docker instance, as you described.
Thanks all for the feedback, I have updated the docs to include the suggestions |
Thanks @BrandonOdiwuor, I'll take another look as soon as I am able, but you'll also probably want to squash these commits, either now or later, but certainly before merge :) |
117c378
to
dcf4557
Compare
…if complete 2e249b9 doc: add release note for PR #28414 (Matthew Zipkin) 4614332 test: remove unnecessary finalizepsbt rpc calls (ismaelsadeeq) e3d484b wallet rpc: return final tx hex from walletprocesspsbt if complete (Matthew Zipkin) Pull request description: See #28363 (comment) `walletprocesspsbt` currently returns a base64-encoded PSBT and a boolean indicating if the tx is "complete". If it is complete, the base64 PSBT can be finalized with `finalizepsbt` which returns the hex-encoded transaction suitable for `sendrawtransaction`. With this patch, `walletprocesspsbt` return object will ALSO include the broadcast-able hex string if the tx is already final. This saves users the extra step of calling `finalizepsbt` assuming they have already inspected and approve the transaction from earlier steps. ACKs for top commit: ismaelsadeeq: re ACK 2e249b9 BrandonOdiwuor: re ACK 2e249b9 Randy808: Tested ACK 2e249b9 achow101: ACK 2e249b9 ishaanam: ACK 2e249b9 Tree-SHA512: 229c1103265a9b4248f080935a7ad5607c3be3f9a096a9ab6554093b2cd8aa8b4d1fa55b1b97d3925ba208dbc3ccba4e4d37c40e1491db0d27ba3d9fe98f931e
dcf4557
to
f22625f
Compare
@pinheadmz I have updated the doc to include the changes on #28414 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great, almost done just a few ideas to make the offline/online wallets less confusing
…sspsbt if complete 2e249b9 doc: add release note for PR bitcoin#28414 (Matthew Zipkin) 4614332 test: remove unnecessary finalizepsbt rpc calls (ismaelsadeeq) e3d484b wallet rpc: return final tx hex from walletprocesspsbt if complete (Matthew Zipkin) Pull request description: See bitcoin#28363 (comment) `walletprocesspsbt` currently returns a base64-encoded PSBT and a boolean indicating if the tx is "complete". If it is complete, the base64 PSBT can be finalized with `finalizepsbt` which returns the hex-encoded transaction suitable for `sendrawtransaction`. With this patch, `walletprocesspsbt` return object will ALSO include the broadcast-able hex string if the tx is already final. This saves users the extra step of calling `finalizepsbt` assuming they have already inspected and approve the transaction from earlier steps. ACKs for top commit: ismaelsadeeq: re ACK 2e249b9 BrandonOdiwuor: re ACK 2e249b9 Randy808: Tested ACK 2e249b9 achow101: ACK 2e249b9 ishaanam: ACK 2e249b9 Tree-SHA512: 229c1103265a9b4248f080935a7ad5607c3be3f9a096a9ab6554093b2cd8aa8b4d1fa55b1b97d3925ba208dbc3ccba4e4d37c40e1491db0d27ba3d9fe98f931e
f22625f
to
c01707b
Compare
@pinheadmz, @willcl-ark , @rot13maxi I have updated the doc with the feedbacks received |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @BrandonOdiwuor looking pretty good now, nice work!
I left some (ok, quite a few!) nits, but not related to the process. Feel free to take whichever you feel improve the readability the most.
could you please review the latest version of the doc |
1f8ac46
to
915dbdc
Compare
915dbdc
to
3c208cc
Compare
ACK 3c208cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3c208cc
Confirmed only updates since last review addressed achow101's nits re: send
and blank
Show Signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
ACK 3c208cc05ea9efb145c956e70f80efd8b027ff33
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmVH8gIACgkQ5+KYS2KJ
yToV3Q//TyBSa0j3/cGSVnT7dNZREnfh2ecKV5IueWBK1OnS3Bae1eLFS9hikmuG
gjxgRJFcrQYnwrqst72fkXlhXWnldam9NRsMV7LB8e5Caq6Vu0Bw+Kn0A1iSGnAc
VpZ5BVTz/bfB5UaLsoxGmsSU7S36YiuleXmuf/y/V59O6bxKBR0AAyxSSPLCW0yZ
KScURimiX0Y7VIfZxQdnj/Jm4a0K9CfaFEjaAJeS622hdQTJDWx/Diwog4PWMdDe
jmjnBQ+zAUT4O90ACJoe+Dipgv4Hl2e4TuvhVU/+2bmycnzxIgD5R2ZUyX7tplbD
b9y4OpEdKuJDu6LMlIJtFvvhESRxGwWaliGS5afXxO4O4slqmMnyizm93jcJdhaQ
SpSCaywOTdbcRQ0/IHn0Lz+hECsAeJgdFgOXJXfH5y5Q1AZkSkXYyrKaNBR+EHpg
vBEPiJyoRu57xzH360JW0PFmUdF4P60mmHQaTl5uH2CdHw0YofTAcjs/KfijqjVu
gEPHHWflq6G9HcUinWZRcZ9asaJG2hzmoyrDTRnrL70ztRVyMtIU/99jN9lsix7s
9Hfv9MPBddFmLbBTKmulmzMZ9r+VOT4eexcq+J9zOwDEZZ/LHC2ClkzvrX7gJDlo
h/dQ9ud7qN5oGOSbbjQ7CTHaquTEw6ijbgHkaEw5E7j95JlSmaQ=
=9+H8
-----END PGP SIGNATURE-----
pinheadmz's public key is on keybase
ACK 3c208cc Looks good to me! |
|
||
### Process and Sign the PSBT | ||
|
||
1. Unlock the `offline_wallet` with the Passphrase: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor capitalization nit.
1. Unlock the `offline_wallet` with the Passphrase: | |
1. Unlock the `offline_wallet` with the passphrase: |
## Overview | ||
In this tutorial we have two hosts, both running Bitcoin v25.0 | ||
|
||
* `offline` host which is disconnected from all networks (internet, Tor, wifi, bluetooth etc.) and does not have, or need, a copy of the blockchain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor capitalization nit.
* `offline` host which is disconnected from all networks (internet, Tor, wifi, bluetooth etc.) and does not have, or need, a copy of the blockchain. | |
* `offline` host which is disconnected from all networks (Internet, Tor, WiFi, Bluetooth, etc.) and does not have, or need, a copy of the blockchain. |
|
||
This tutorial will describe how to use two instances of Bitcoin Core, one online and one offline, to greatly increase security by not having private keys reside on a networked device. | ||
|
||
Maintaining an air-gap between private keys and any network connections drastically reduces the opportunity for those keys to be exfiltrated from the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor hyphenation nit.
Maintaining an air-gap between private keys and any network connections drastically reduces the opportunity for those keys to be exfiltrated from the user. | |
Maintaining an air gap between private keys and any network connections drastically reduces the opportunity for those keys to be exfiltrated from the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3c208cc
Great work!
This PR adds offline signing tutorial. Fixes #9492
Although there currently exists tutorials on external-signer and on multisig implemented on #24519 . The external-signer tutorial assumes a connected device and the multisig tutorial is only for multisig transactions and does not include using an offline wallet