bdk icon indicating copy to clipboard operation
bdk copied to clipboard

Variable block confirmation for confirmed balances

Open matthiasdebernardini opened this issue 8 months ago • 3 comments

Describe the enhancement

Allow wallet.balance().confirmed to be configurable based on how many blocks it should consider it to be confirmed, 1 by default then 3 or 6. Not sure what else could be useful.

Use case

Wallets designed for large balances should prefer to have this set to a high number, 6 for example.

Additional context

Got posted in bdk_wallet first, @evanlinjin noted that this can be achieved via wallet.local_chain().tip() https://github.com/bitcoindevkit/bdk_wallet/issues/210

matthiasdebernardini avatar Apr 16 '25 14:04 matthiasdebernardini

1 doesn't feel like a great default to me. Reorgs of depth one happen all the time. I would go with 3, which to my knowledge has never occured, and then leave 1, 3, 6 as options.

rustaceanrob avatar Apr 16 '25 15:04 rustaceanrob

I agree. If confirmed means finalfinal or not subject to change, then yeah it should be 3 and not 1. Though it should be optional.

matthiasdebernardini avatar Apr 16 '25 17:04 matthiasdebernardini

Can I take this?

uvuvuwu avatar Apr 30 '25 04:04 uvuvuwu

Hi @uvuvuwu! Just checking in to see if this is still being actively worked on — or if there’s anything we can do to help move it forward. Let us know if you're still interested or if you’ve run into any blockers.

LagginTimes avatar Jul 22 '25 16:07 LagginTimes

Hi @LagginTimes . Sorry I am no longer able to work on this actively. Please feel free to take over.

uvuvuwu avatar Jul 23 '25 09:07 uvuvuwu

Closed with #2007.

LagginTimes avatar Sep 10 '25 07:09 LagginTimes