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.
There are some naming problems in electrum and esplora code.
scanshould mean without a keychainscan_with_keychainshould be the name of the one that scans with a keychainSame applies to
update_tx_graph_without_keychainandupdate_tx_graphin esplora (which I would likewise rename toscanandscan_with_keychain).The problem with the current naming is that it makes it seem
scan(with a keychain) is the simple default and thatscan_without_keychainis 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.scan_with_keychainthat it should be used sparingly and explain the circumstances where it should be used.scan_with_keychainother than thekeychain_spksin both esplora and electrum. This emphasizes the special case that it should be used for.scantosyncinstead since that's the nomenclature we have elsewhere.