How do ledger wallet keys work?

8 replies 174 views
paulbitMember
Posts: 5 · Reputation: 145
#1Jul 2, 2021, 05:23 AM
So, I've successfully downloaded and set up bitcoin-cli from GitHub. I can send and receive bitcoins using the send toaddress and get new address features. I'm pretty happy that it works well without needing any third-party software that I don't fully trust. But I've hit a snag: I need to download the whole blockchain to my PC with Bitcoind. Is there any way to use the send toaddress and get new address functions just with the wallet.dat file on my PC? I really don't want to deal with the entire blockchain. Is that possible? Also, how do ledger wallet keys even work? The blockchain isn't stored on that small key, but it still does its thing!
5 Reply Quote Share
diamond_atlasSenior Member
Posts: 408 · Reputation: 1359
#2Jul 2, 2021, 10:55 AM
You are using a non custodial wallet, that gives you private key of your wallet. With private keys, you will be able to get public key, public address (receiving address). It is your receiving address for other people to send bitcoin to you. If you want to send your bitcoin to other people, you need their receiving addresses and you must ask them about those addresses. Learn more about Keys, addresses in Mastering Bitcoin Book. Also read more in the Wallets chapter.
2 Reply Quote Share
RogueDegenFull Member
Posts: 74 · Reputation: 309
#3Jul 3, 2021, 07:46 PM
Bitcoin Core is no more official than any other Bitcoin wallet software.  It is just as "third-party" as anything else.  It has a fancy name, and it is popular so it's currently considered to be the "reference client", but if some other full node software were to become more popular than Bitcoin Core, then, due to how the bitcoin protocol works, that other software would be the "reference client". To send a transaction, the wallet software needs to know what bitcoins you have.  Bitcoin Core determines this by downloading the blockchain and noticing EVERY transaction that sends bitcoins to a transaction output that it knows how to access. If you only want to store private keys, and generate receiving addresses, you can do that with Bitcoin Core without downloading the blockchain.  If you want to be able to tell when you've received a confirmed transaction and/or you want to be able to send any transactions, you'll need to have processed most of the blocks (enough of them to have gotten caught up to where the bitcoins are confirmed). Then you're not interested in running a full node.  Why are you using Bitcoin Core? Sure. You can use a SPV (Simplified Payment Verification) wallet. Correct.  The ledger device stores only the keys and the necessary software to communicate with other wallet software. To use the ledger device you have to connect it to wallet software (such as Electrum).  Most of the software set up to work with the Ledger are SPV wallets.  The wallet software handles verifying when payments are received/confirmed as well as building the transactions to send bitcoins.  When you want to send bitcoins, you first use the wallet software on some other device (such as a computer) to build the transaction. Then you send the unsigned transaction over to the Ledger device.  From the Ledger device, you can sign the transaction. The signed transaction is then sent back to the wallet software which then broadcasts it to the network.
2 Reply Quote Share
leo.wolfHero Member
Posts: 540 · Reputation: 2813
#4Jul 3, 2021, 08:26 PM
Then your only option is to use an SPV wallet (example is electrum and sparrow) which definitely you have to trust a third party and that actually hampers your privacy because these wallets know what you own. The other thing might be a pruned node but you still have to download all the blockchain but will just keep a few of them mostly the one that has details of the address you are using and if you want to use another address you will have to download all the blockchain again. The SPV wallet will allow you to generate new address for every new transaction but your privacy will certainly be at risk
4 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#5Jul 3, 2021, 11:09 PM
A node with pruned blockchain doesn't have that limitation, it's only applicable to newly imported address(es) or wallets with transaction history contained in the pruned blocks. The user can still create new "fresh" addresses whenever he wants. Another correction is it doesn't select the blocks where the related transactions are, it deletes the oldest to the newest blocks depending on the set size.
2 Reply Quote Share
leo.wolfHero Member
Posts: 540 · Reputation: 2813
#6Jul 4, 2021, 02:22 AM
Thanks for the correction, I am aware that it the reason why it needs to download the entire blockchain again for some imported addresses is because that address(es) must have a transaction stored in older blocks with it not available due to size cut down it is needed to download so as to scan every transaction of done with the imported addresses. Also according to your explanation of a size of 10GB is assigned to the pruned node, it will delete older blocks as new blocks begin to build up, so as to maintain the size (I.e) or the new blocks just continues to add up which will actually increases the size and could make it bigger than that 10GB in future? Should the the older blocks be deleted what happens to the first address of one if its transactions falls into those deleted old blocks?
1 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#7Jul 6, 2021, 08:18 AM
The former, it'll keep on deleting older blocks to keep the size set by the user. Bitcoin Core already saved the related transactions in the wallet.dat file so your wallet wont need to rely on the raw blockchain to view the balance or create transactions. Besides, the "UTXO set" and "block index" aren't deleted with pruning so your node still know the unspent transactions in the deleted blocks. The issue is when it need to rescan and verify them from the raw blockchain which is needed when importing an address which will cause issues if it has txns from the pruned blocks.
3 Reply Quote Share
Posts: 53 · Reputation: 235
#8Jul 7, 2021, 06:58 AM
Exactly. Ledger also offers the option of connecting to a Bitcoin node of your choice in Experimental Mode. This means that you don't necessarily have to trust external servers, but can also set up a node yourself and let it communicate with Ledger (live): Here you can see how it works: SETTING UP YOUR BITCOIN FULL NODE But I have to admint that I have never used this feature myself.
4 Reply Quote Share
sam_guruFull Member
Posts: 95 · Reputation: 488
#9Jul 7, 2021, 09:30 AM
Ledger is a hardware wallet that does not have good reputation and it's close source too. Guides for setting up and running Bitcoin full node, not related to Ledger. [GUIDE] The simplest Full Node guide ever. [Guide] How to run a Bitcoin Core full node for under 50 bucks! If people want better privacy and anonymity, running a Bitcoin full node with Tor and use it for their storage as well as transaction broadcasting is a good choice.
3 Reply Quote Share
?Reply
Sign in to reply to this topic

Related topics