-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix and improve solo stamping #141
base: master
Are you sure you want to change the base?
Conversation
signrawtransaction was replaced with signrawtransactionwithwallet in Bitcoin Core v0.17.0 Also added debug logging.
af3b6ab
to
496884e
Compare
Review hint: git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-space-change
496884e
to
640e9c8
Compare
|
||
blockhash = None | ||
|
||
logging.info('Waiting for confirmation. This can be interupted and resumed with:\nots stamp --nonce=%s --txid=%s', nonce.hex(), txid[::-1].hex()) |
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.
This doesn't actually work as intended. You need to run ots stamp -b --nonce=x --txid=x
. If the -b
is left out stamping happens normally, ignoring the nonce
and txid
arguments.
Maybe we want --nonce
and --txid
to force -b
on?
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.
Another issue we have right now is that if you use the txid
and nonce
options after a block has confirmed, ots fails to find the new block.
Maybe we could query the wallet for the transaction? Or maybe we also need a block height?
If we have all three options, we probably want to do it via a single --resume option that can find the tx even if the txid changes.
Currently trying to stamp with
--btc-wallet
will fail for two reasons:signrawtransaction
RPC has been deprecated for yearsThis PR switches to the replacement
signrawtransactionwithwallet
RPC. It also skips using the calendars when using--btc-wallet
.In addition it adds a
--fee-rate
argument so you're not dependent on whatever Bitcoin Core decides.In case the process fails mid way after broadcasting a transaction, as it did before this PR, there's now a way to resume by passing a
--nonce
and--txid
argument. This has the nice benefit of also making RBF possible.Finally it documents in the README that this functionality exists, but with a warning.
Unrelated, it also adds a
--btc-signet
option, though at least for stamping--btc-testnet
works fine with signet.Fixes #139 and #140.