Skip to content

Unintuitive and undocumented full_scan behavior #2057

@andreasgriffin

Description

@andreasgriffin

Book of BDK has a overview of the expected sync behavior

Image

However full_scan seems to completely ignore the revealed addresses and goes by the gap only. This means that if there is a large gap it will not discover any transactions even though the addresses are already revealed. A sync will discover those transactions, such that for a "full scan" one has to do full_scan and sync .

Thanks to @design-rrr for finding this behavior.

  • Reproducible in bdkpython 2.0.0

Why not do sync most of the time?

  • onchain wallets can have multiple instances running, that reveal and use scripts. That means that the wallet always has to sync at least the gap limit ahead to discover txs that other instances used.

What to do about it?

  • Was this behavior intended?
    • But then to do a full scan, one has to hit the server twice... --> inefficient

@thunderbiscuit @ValuedMammal

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThere's still a discussion ongoingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    Status

    Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions