Skip to content

scan_without_keychain and scan's names should be inverted #1112

@LLFourn

Description

@LLFourn

There are some naming problems in electrum and esplora code.

  • scan should mean without a keychain
  • scan_with_keychain should be the name of the one that scans with a keychain

Same applies to update_tx_graph_without_keychain and update_tx_graph in esplora (which I would likewise rename to scan and scan_with_keychain).

The problem with the current naming is that it makes it seem scan (with a keychain) is the simple default and that scan_without_keychain is the exception. But scanning with a keychain (stop_gap) is very inefficient and should only be used when restoring from seedwords. Mutiny wallet caused a lowkey denial of service attack on mempool.space because they were always scanning with keychain.

  • it needs to be documented on scan_with_keychain that it should be used sparingly and explain the circumstances where it should be used.
  • I would remove all the other arguments from scan_with_keychain other than the keychain_spks in both esplora and electrum. This emphasizes the special case that it should be used for.
  • Perhaps we should change scan to sync instead since that's the nomenclature we have elsewhere.

Metadata

Metadata

Assignees

Labels

new featureNew feature or request

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions