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

chain: set DEFAULT_LOOKAHEAD to 25 #1296

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

yukibtc
Copy link
Contributor

@yukibtc yukibtc commented Jan 23, 2024

Description

Change DEFAULT_LOOKAHEAD to 25, as suggested by @LLFourn in #1262.

Fixes #1262

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Copy link
Contributor

@LLFourn LLFourn left a comment

Choose a reason for hiding this comment

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

ACK 285ff46

Copy link
Member

@evanlinjin evanlinjin left a comment

Choose a reason for hiding this comment

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

ACK 285ff46

I'm not a fan of this as a long term solution to solving slow startup times. However, I think it would be safe to assume that, for now, no user of BDK wallet requires a lookahead of >25.

We should do follow up PRs for some or all of the following:

  1. Make lookahead configurable in bdk::Wallet.
  2. Cache spks in persistence.
  3. Figure out how to improve the performance of deriving spks.

@LLFourn LLFourn merged commit d162208 into bitcoindevkit:master Jan 29, 2024
12 checks passed
@LLFourn
Copy link
Contributor

LLFourn commented Jan 30, 2024

Another idea is that we could set this value lower in debug compilations and higher in --release. Not sure if this would offend people though.

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.

Wallet initialization require many time compared to 1.0.0-alpha.2
3 participants