Skip to content

Add locktime default to payjoin-cli - #1445

Merged
arminsabouri merged 1 commit into
payjoin:masterfrom
benalleng:cli-locktime
Mar 26, 2026
Merged

arminsabouri merged 1 commit into
payjoin:masterfrom
benalleng:cli-locktime

Conversation

@benalleng

@benalleng benalleng commented Mar 26, 2026 •

Copy link
Copy Markdown
Collaborator

This a default locktime to the payjoin-cli for the purpose of demonstrating good wallet fingerprinting practices. For demonstrating wallet fingerprinting in external wallet integrations I think it is important for the cli to be opinionated about how every aspect of tx creation is a way to give up some privacy.

Here is an example of a tx using this new locktime feature

Written mostly by claude code

Pull Request Checklist

Please confirm the following before requesting review:

@benalleng
benalleng requested a review from arminsabouri March 26, 2026 13:04
@coveralls

coveralls commented Mar 26, 2026 •

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 23598207631

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 84.129%

Totals Coverage Status
Change from base Build 23542895551: 0.004%
Covered Lines: 10649
Relevant Lines: 12658

💛 - Coveralls

@arminsabouri arminsabouri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually want the opposite. We should reduce the optionality. If most payjoin capable wallets are setting nlocktime to the current height we should do the same and prevent the user from changing nlocktime.

This is the same argument for manual user fee fingerprints -- fees end up being round and stand out as a fingerprint.
In general optionality reduces your anon set https://www.freehaven.net/anonbib/cache/usability:weis2006.pdf

@benalleng

benalleng commented Mar 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

We should reduce the optionality.

So just default to the current block height +1?

@arminsabouri

Copy link
Copy Markdown
Contributor

We should reduce the optionality.

So just default to the current block height +1?

Doesn't bitcoin core wallet already handle fee sniping?
bitcoin/bitcoin#2340

@benalleng

benalleng commented Mar 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

Yes, but only in the gui. the cli interface just defaults to 0 afaik*

Context from the above PR

wallet transactions (only, no RPC changes)

@arminsabouri

Copy link
Copy Markdown
Contributor

Yes, but only in the gui. the cli interface just defaults to 0 afaik*

Context from the above PR

wallet transactions (only, no RPC changes)

I assumed that meant "no new rpc options added. We will just default to anti-fee sniping behavior". Thats really odd. ok then yes we want to match the core behavior. I think they set it to current height.

@benalleng
benalleng force-pushed the cli-locktime branch 2 times, most recently from 9c3ca31 to f7355d1 Compare March 26, 2026 13:49
This adds a default locktime to the payjoin-cli for the purpose
of demonstrating good wallet fingerprinting practices. For demonstrating
wallet fingerprinting in external wallet integrations I think it is
important for the cli to be opinionated about how every aspect of wallet
creation is a way to give up some privacy. This default is the current
block height + 1 to be inline with bitcoin core anti-fee-sniping.
@benalleng
benalleng requested a review from arminsabouri March 26, 2026 13:56
@benalleng benalleng changed the title Add locktime flag to payjoin-cli Add locktime d to payjoin-cli Mar 26, 2026
@benalleng benalleng changed the title Add locktime d to payjoin-cli Add locktime default to payjoin-cli Mar 26, 2026

@arminsabouri arminsabouri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK a0dd291

@arminsabouri
arminsabouri merged commit 726fb4a into payjoin:master Mar 26, 2026
14 checks passed
@benalleng benalleng mentioned this pull request Jun 7, 2026
17 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants