As I understand, BitcoinCore
is implementation of Bitcoin
protocol. And within BitCoinCore is wallet functionality located in wallet.cpp/h. My question is, if I have some other wallet that has complete copy of a blockchain (full node wallet) how it will be different from BitcoinCore? Which parts of the code that other wallet wont have in it?
1 Answer
Bitcoin Core is primarily a node (also known as a peer) intended to join the Bitcoin network. It includes wallet functionality, but its primary purpose is to interact with the Bitcoin p2p network, and help validate all blocks and transactions for adherence to the consensus rules, which are encoded in the Bitcoin Core source code.
Due to this, it also functions as the reference implementation of the Bitcoin Protocol.
If you had another piece of software that connects to the Bitcoin network and performs all functions a full node does (checking block and transaction validity, following the best chain, serving data to other nodes, etc.) and it offered a wallet, it would be functionally equivalent to Bitcoin Core.
However, there are not a whole lot of these softwares around - btcd is one of the most well known and complete ones, but most projects aim to just build a wallet on top of protocols like Simplified Payment Verification (SPV), electrum, or custom solutions to share only the data required by the wallet, instead of the entirety of the Bitcoin blockchain.
Note that even running Bitcoin Core in pruned mode disqualifies it from being a full node, as it is no longer able to fulfill the function of being able to serve historical data to other nodes.
-
Hi, thank you for your answer! So other full node wallets, beside BitcoinCore in order to validate blocks must have same functionality to check blocks (and transactions inside them), as BitcoinCore has?– ddavi031Jul 17, 2020 at 12:54
-
Yes, part of being a full network participant (full node) is being able to ensure validity - if you aren't able to check transactions and blocks and arrive at the same conclusion as other full nodes, you will end up on a fork Jul 17, 2020 at 13:06