spesmilo / spesmilo/electrum

Don't back-date locktime during RBF and when spending unconfirmed UTXOs

Open
#8,073 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-wallet 👛
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

The Electrum wallet, similar to the Bitcoin Core wallet, back-dates the locktime of 10% of it's transactions to up to 100 blocks in the past.

https://github.com/spesmilo/electrum/blob/b357391c4806acbc3d34a907b8f414601276b5fe/electrum/wallet.py#L222-L225

I've just opened these two issues for the Bitcoin Core wallet. I think they are relevant here too.

If these changes are implemented in Bitcoin Core, it might be useful to adapt the behavior here too.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in electrum/wallet.py around lines 222-225, where transaction locktime back-dating is described. Compare that behavior with Bitcoin Core issues #26526 and #26527, then determine how RBF and spends of unconfirmed UTXOs should avoid back-dated locktimes; done means the affected transaction cases follow the agreed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.