Conversation
af3b6ab to
496884e
Compare
496884e to
640e9c8
Compare
otsclient/cmds.py
Outdated
|
|
||
| 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.
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.
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.
There was a problem hiding this comment.
I added 3123c98 which creates an .ots.pending file with a nonce and txid. It sets --btc-wallet, so that's a step in the right direction. But it doesn't deal with RBF.
There was a problem hiding this comment.
I'm currently testing RBF tracking, will push if it works.
signrawtransaction was replaced with signrawtransactionwithwallet in Bitcoin Core v0.17.0 Also added debug logging.
Review hint: git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-space-change
640e9c8 to
c74f026
Compare
|
Alright, I had my agent rebase this, address the feedback and make a small improvement based on its experience of accidentally making two transactions because it didn't bother to store the nonce. The range-diff with my previous version looks sane to me, but it's been too long to remember what I was originally doing :-) Used this to timestamp the recent Utrecht and Amsterdam municipal election counts: https://github.com/Sjors/verkiezingen-processen-verbaal/tree/master/2026-GR |
c74f026 to
a2fb0b5
Compare
Currently trying to stamp with
--btc-walletwill fail for two reasons:signrawtransactionRPC has been deprecated for yearsThis PR switches to the replacement
signrawtransactionwithwalletRPC. It also skips using the calendars when using--btc-wallet.In addition it adds a
--fee-rateargument 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
--nonceand--txidargument. 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-signetoption, though at least for stamping--btc-testnetworks fine with signet.Fixes #139 and #140.