Skip to content
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

Address gap limit? #1577

Open
evanlinjin opened this issue Aug 27, 2024 · 3 comments
Open

Address gap limit? #1577

evanlinjin opened this issue Aug 27, 2024 · 3 comments
Labels
bug Something isn't working discussion There's still a discussion ongoing
Milestone

Comments

@evanlinjin
Copy link
Member

Describe the situation

An undisclosed user of ours ran into an issue where creating multiple unbroadcasted transactions resulted in incrementing the revealed index for the internal keychain too rapidly. Eventually, the gap of unused addresses surpassed the stop_gap set for the spk-based chain source, thus some transactions were not caught by the syncing process.

This is caused by Wallet::create_tx which marks change addresses as used.

self.indexed_graph.index.mark_used(change_keychain, index);

The correct use of the current API would be to call Wallet::cancel_tx. However, I would argue that this is unwieldy and not immediately apparent.

pub fn cancel_tx(&mut self, tx: &Transaction) {

Also, recently another user mentioned trying to implement some sort of address-recycling logic on Discord @ #bdk-users.

What to do

Not sure, let's discuss.

@evanlinjin evanlinjin added bug Something isn't working discussion There's still a discussion ongoing labels Aug 27, 2024
@notmandatory notmandatory added this to the 1.0.0-beta milestone Aug 28, 2024
@notmandatory
Copy link
Member

Is this fixed by #1579 ?

@LLFourn
Copy link
Contributor

LLFourn commented Sep 10, 2024

This is an issue about a new feature that would stop revealing new addresses passed the stop gap. It's related to #1579 as it would have softened the problem for the user who doesn't called cancel_tx but it is not fixed by resolving that.

@notmandatory
Copy link
Member

If this a new feature request can we move it out of the 1.0 beta milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion There's still a discussion ongoing
Projects
Status: Todo
Development

No branches or pull requests

3 participants