Hi does anyone knows where can i find electrum's proof of work in the source? https://github.com/spesmilo/electrum
2 Answers
Miners perform the proof-of-work that secures the blockchain. Electrum is not a miner.
Electrum is a light wallet, it does not perform proof-of-work hashing to create blocks, instead it just checks to ensure that relevant transactions are valid. Rather than download the entire blockchain, it will just download the block headers (much less data), and then it can perform cryptographic checks to ensure that everything is legit.
For transactions in particular, the wallet will ensure that the relevant transaction hashes are present in the merkle root of a block (the merkle root is part of the block header). The wallet can request the relevant transactions, and then hash them to verify that the correct merkle root is reached (ie, the same merkle root that is present in the longest valid proof-of-work chain). Due to the one-way nature of hash functions, a node could not serve an invalid transaction hash to a wallet, or else the root would change entirely and the wallet would know it is invalid.
In this way, light wallets allow you to verify the blockchain's history with a low level of trust, and low resource intensity (less data, and less verification computation).
-
Thank you! What about bitcoin core? I saw there is a miner.cpp I their source code Nov 23, 2017 at 7:12
on the website you linked they write "Lightweight Bitcoin client" in the headline. electrum is a wallet, not a miner. electrum does not implement any proof of work algorithm because only the miner work with proof of work to verify "deployment" of resources to determine who earns the blockchain reward for a certain found hash.