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

Add flag --skipmerklecheck #4957

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

chris-belcher
Copy link
Contributor

@chris-belcher chris-belcher commented Dec 22, 2018

The --skipmerklecheck optional flag makes Electrum tolerate invalid merkle proofs from the server. This is useful for building Electrum servers that need a minimum amount of storage, though of course users should only enable it if they completely trust the connected server.

This is primarily motivated so that Electrum Personal Server can be compatible with pruning. Users who have a pruned full node would enable --skipmerklecheck. Also it would make it much easier to create a "no history" mode where the rpc call scantxoutset (chris-belcher/electrum-personal-server#27) is used to find a wallet balance without needing a long rescan.

The way this works is based on an IRC conversation with ghost43 who suggested this method, saying it's a little bit hacky but is easy to test and maintain, and is preferable to modifying the code in 10 different places for something that wouldn't be tested very often.

The --skipmerklecheck optional flag makes Electrum tolerate invalid
merkle proofs from the server. This is useful for building Electrum
servers that need a minimum amount of storage, though of course users
should only enable it if they completely trust the connected server.
@SomberNight SomberNight added the topic-network 🕸 related to logic in network.py (etc) label Dec 22, 2018
@chris-belcher
Copy link
Contributor Author

Could I get a concept ACK ?

@SomberNight
Copy link
Member

Tested this now; looks okay.

Note that when this option is enabled, the wallet file will get modified as if the present transactions have been SPV verified (these transactions will not be rechecked even if the user disables the option and connects to different servers). The assumption is that the user only uses this option when connected to a server they fully trust.

@SomberNight SomberNight merged commit d5c8a0e into spesmilo:master Jan 16, 2019
@chris-belcher chris-belcher deleted the add-skipmerklecheck-flag branch January 23, 2020 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-network 🕸 related to logic in network.py (etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants