I've got a bunch of questions based on what I've learned so far, some are from my research and others are just random thoughts.
So, I think nodes are set up to accept and confirm transactions according to certain rules, and if a transaction doesn’t follow those rules, it gets rejected. But since it's all programmed by humans, is there a chance a node could mess up or something weird could happen, and it ends up accepting a transaction that doesn't meet the rules? If that occurs, can other nodes spot such a transaction and remove it from the chain?
Also, what’s the real difference between bitcoin core and a bitcoin wallet? I always figured bitcoin core was a type of wallet, but to run it, you have to download the entire blockchain, which has its own requirements as I mentioned in a previous post. Yet, while going through "learnmeabitcoin," I noticed they used "bitcoin core" and "wallet" like they’re not the same. Are they maybe using "wallet" to mean something like "SPV" in this case?
And one more thing that caught my eye was a topic on bitcoin.stackexchange.com (which was suggested in my last post) about how many public keys a single private key can create... One reply explained that you get one public key from a private key, and then you can use that public key to create multiple public addresses.
What’s the difference between a private key, a secret phrase, a public key, and a public address? I tried looking into it but still couldn't get a clear answer.
Questions about nodes and wallets
14 replies 346 views
block_novaMember
Posts: 4 · Reputation: 63
#2Apr 23, 2023, 08:25 PM
Nodes doesn't confirm the transactions only miners can include and confirm the transaction, it only validates them and if there is a node that contains wrong data then it will be rejected by other nodes and that is what we call the decentralized network.
Bitcoin core is also a bitcoin wallet, but it can have the entire blockchain data and acts as a node too so if you want to participate in the decentralization of bitcoin network then you also can join by running a full node. SPV wallets are nothing but Simplified Payment Verification for example electrum which doesn't download the entire blockchain data to operate but connect with already existing peers which are considered as trustworthy so you can just install and access the wallet instantly.
Secret Phrase or Seed Phrase - master key for all of your private keys which can be combination of 12/18/24 words. Using seed phrase you can generate all the private keys associated with that.
private key (imagine it as key to your safe) - It's a long, randomly generated string of numbers and letters.
Public Key ( your mobile number) - This is something you can share and others can contact you using this such as send their Bitcoins to your address.
Only you can access the bitcoin associated with it since it needs private keys to authorize it. And the hashed version of public key is public address.
Any public key and Any address can be generated by 2^96 private keys on average.
To receive fund, you need to have a bitcoin address and give it to anyone who wants to send you bitcoin.
You need the private key associated with your address for unlocking the fund you receive.
A private key generates a public key and the public key generates your address.
Usually, you don't need to know your public key at all.
Instead of having a single private key and a single address, you can use a HD wallet and generate a seed phrase.
A Seed phrase is a series of words. It usually contains 12 or 24 words and it's also called a recovery phrase or mnemonic phrase.
With using a HD wallet, you can have numerous addresses all generated from a single seed phrase.
nonce_nodeMember
Posts: 16 · Reputation: 223
#4Apr 24, 2023, 05:03 PM
There can be malicious nodes, but they stand nothing to gain. Nodes validate tx's and relay it to other nodes, if you as a node include invalid data or tx's, it would be rejected by other nodes.
BTC core is a BTC full node client which you use to run the entire BTC blockchain, so you can verify everything locally and also help to add more security to the BTC network. BTC core is also a wallet, one that gives you better privacy than SPV clients because you don't have to connect to third party servers, but to only your own server.
Thank you for your explanations and corrections.
I still dont get this part, this was what I saw that made me include the question in this thread. If 2^96 private key can generate any private key and address doesnt that mean that two private key would be able to generate the same public address? Please if its possible for you to explain it in a more simpler form I would greatly appreciate it.
Sorry, by HD wallet do you mean Hardware wallet? I understood the rest part just wanted to know what you meant by HD wallet.
Thanks you so much for your support so far.
I just edited my previous post, as I noticed I made a mistake.
There are nearly 2256 valid private keys and 2160 addresses. (There are more addresses, if we consider different types of addresses).
Therefore, any address can be generated by around 296 private keys on average.
Note that in practice, it's impossible that you can have mutliple private keys that generate the same address. 2256 is a very big number and you can't find the collisions.
No, HD wallet means Hierarchical Deterministic wallet.
r3al_v4ultMember
Posts: 54 · Reputation: 222
#7Apr 24, 2023, 10:35 PM
They intentionally separated the 'Node' from the 'Wallet' when referring to each because those are separate modules of Bitcoin Core.
For example: If the user want to run a node without a wallet, it has an option to do so.
Also, "Bitcoin Core" is the name of a software, the reference client for running a Bitcoin Node and a Bitcoin wallet.
So if they used that name in an article, they are referring to the whole software,
if they used the term "wallet", they are referring to the wallet,
if they used the term "node", they are referring to a Bitcoin node (may be anything aside from Bitcoin Core).
I would note that there is nothing "trustworthy" about Electrum servers. They are simply servers, and there is no mechanism to assign ratings to servers as either "trustworthy" or "malicious". Electrum gets around this problem by connecting to multiple different servers rather than just one, but you could very easily connect to a malicious server which either tries to feed you incorrect data or (more likely) surveil your transactions.
Most private keys are not randomly generated, but rather deterministically generated from your random entropy. This is why the same seed phrase can reproduce the same private keys in different wallets.
Correct. But practically, it will never happen. The number of possible addresses is simply too large to ever find a collision.
The vast majority of wallets in use today are hierarchical deterministic wallet. This simply means that all the private keys in the wallet are generated in a deterministic (procedural) way, following a set hierarchy (pattern). In simple English, the wallet takes your seed phrase and generates a tree of private keys using a set process, meaning that you can use your seed phrase to recover your entire wallet and all your private keys and addresses.
This differs from original bitcoin wallets in which each private key was randomly generated from scratch, and you therefore had to back up each private key individually.
Bitcoin Core is a software which consists of two integrated parts - node and wallet. The node part is mainly responsible for communication with other nodes( transmitting&getting transactions, validating them) as well as for the keeping of the fresh (when being synchronized) copy of blockchain while the wallet part (which has internal API to communicate with the node) has a concern ( mainly) over getting UTXOs state relevant to the controlled private-public key pairs (not to mention the generation of those pairs and transactions building).
t0m.v3ctorMember
Posts: 7 · Reputation: 123
#10Apr 27, 2023, 02:02 AM
Bitcoin Core is one of Bitcoin wallet softwares, it's not the only wallet software to store bitcoin or to run a Bitcoin node.
But it is a most famous Bitcoin wallet software and a most trusted one to run a Bitcoin full node.
SPV is for Simple Payment Verification and I think you can guess role and feature of SPV wallet software.
You can read an example with Electrum wallet. https://electrum.readthedocs.io/en/latest/spv.html
Download Bitcoin Core from https://bitcoincore.org/en/download/
Verify the wallet and set up your full node with Bitcoin Core.
[Guide] How to run a Bitcoin Core full node for under 50 bucks!
If you are still unclear about Bitcoin Full Node and Wallet softwares to run a full node, you can read this topic
Cryptocurrency Client Categorization (Full node, Pruned node, SPV node,...)
Wow, Ive always thought HD meant hardware wallet, which means Ill have to go back and reread some articles I read before so that I can get the correct information they were trying to pass off.
But one last question; Can ELECTRUM be considered as a hd wallet?
And what other examples do we have that are beginner friendly?
50 bucks might worth little for most people here but its not for me; although I have it in my bucket list, Ill surely setup a full node when Im capable to do so financial, I want to see what Ive been studying for myself.
Yes, absolutely. Electrum wallets use a seed phrase, from which all your private keys are generated in a deterministic pattern as I described above, which means backing up only your seed phrase is sufficient to back up your entire wallet.
Almost all wallets these days are HD wallets, and that includes both software wallets and hardware wallets. Wallets other than Electrum I would recommend would be Sparrow (software) and Passport (hardware).
Yeah, ELECTRUM is a hd wallet which means it generates keys in accordance with BIP32 standard but its genuine SEED phrases are not BIP39 compliant (though use the full BIP 39 wordlist).
I would advocate Sparrow as software HD and BIP39 compliant wallet for both novices and experienced users.
That is true, which means that "genuine Electrum's SEED phrases are not BIP39 compliant".
Electrum wallet supports BIP39 SEED at restoring but does not generate it. Electrum's SEED generation scheme was introduced when BIP39 one was not existed:
Thus, my initial statement was exactly accurate, IMHO.
For the sake of completeness, if anyone wants to know what the exact difference is between an Electrum seed and the BIP39 standard:
The topic was discussed here on the board at the beginning of 2023: BIP39 vs Electrum Mnemonic seed
TL;DR:
Related topics
- What Should I Know About Multisig Wallets? 13
- Creating a list of non-zero wallets and their balances using Python 4
- Curious about recovering BTC from 2010/2011 7
- Restoring wallets from pre-fork days 7
- Best practices for securely storing newly generated wallets programmatically 14
- Ukraine plans to restrict crypto wallets for illegal funds, says finance minister 9