Question to the Bitcoin wizards out there. Why do I need to sync the entire Bitcoin blockchain if all I want is to create a new wallet and receive in that wallet? Can't the deamon be syncing in the background while my new wallet is good to go?
Discussion
What if it’s a corrupt version?
Syncing the chain won't check if the software is corrupt or not, right?
How would it know whether or not before it was fully validated?
No. Syncing the entire chain will only verify that the chain data is valid. You could still have malicious/corrupt software. E.g. the wallet or a component of the wallet, if I understand your question correctly.
Right. As long as the software is good and there is no overlay software potentially fucking with your whole screen (looking at you, Microsoft), then youbcan receive at that new address just fine. To verify that you have received the coins with a few confirmations is a matter of checking multiple other people's nodes for a pretty high degree of confidence, or checking your own node once fully synced with the timechain for certainty.
I believe Electrum wallet by default checks 10 different nodes. You can use blockstream and mempool.space nodes too.
Best to use multiple sources, not just the electrum wallet, in case of an attack of spam nodes
But better still to verify with one of your own fully synced nodes.
I run one full node 24/7 and some pruned nodes. You can verify with certainty that the coins are received and confirmed on a mempool.space instance tied to such a setup instead of waiting for the new node to sync itself.
Exactly. People still have to trust the software. Since that trust is already established, software could ship with checksums for some later starting blocks in order to allow a more recent starting point.
You don't need to use a full node to create a simple wallet. If you insist on using Bitcoin core wallet then you can try a pruned node perhaps
How else would you know you received legit sats if the txn isnt validated?
There seems to be a tradeoff between convenience and full verification.
There seems to be technical debt that blocks devs from modernizing the code.
i thought you were the bitcoin wizard
You are asking a Full Node vs Pruned Node question.
Full Nodes contain a full copy of all transactions and validated the chain of hashes from the genesis block to today.
Pruned Nodes contain a rolling subset of transactions, dropping the oldest blocks to free up disk space.
Both, however, go through the process of downloading all blocks and independently verifying the chain of hashes from the first block to the most current. Pruned nodes simply start discarding the oldest blocks to free up disk space or meet configured requirements.
It's even before that. If all I want is to create a new wallet then all I need is to create, receive and then the software can save the wallet and do a prune in everything but the wallet
It makes me a bit disappointed, that it's still not possible to make a self hosted setup without 1 gig of disk.
Let's say you have an old seedphrase backup, and want to load it in a new setup to check the balance, in own bitcoin core node + electrum + sparrow stack.
Bitcoin core will download all the blocks!
With assumevalid, it will not _validate_ most of the old blocks, but it downloads them.
Pruned you cannot set until first you download everything.
Electrum does not work with pruned node.
So you need 1 gig of disk space and a few days to do this...
AFAIK there is no shortcut that does not rely on external server or some other trick (like copying blocks from another pruned node).
Not quite right.
Let’s say you start with a 256 GB SSD drive.
Bitcoin Core and Knots will start with block 1 and download them all, but will begin pruning (discarding old blocks) when it begins running out of space.
You will download everything (to verify the chain of one block to another) but you will be a pruned node by the time it finishes.
Technically, you don’t need to sync the chain at all to create a wallet. Synching the chain only becomes relevant once you transact. As mentioned by nostr:nprofile1qqsvxkhtrgywqapdnw3qrmzun2hmy9awa9te9r9cckku2ylpmatwk5qpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhs8raf6e some wallets allow to sync only part of the chain. If memory serves, it’s called SPV and is intended for things like lightweight or mobile wallets.
This is the correct answer to the question
Its an event sourced database. The state it’s trying to reconstruct is the state of all of the balances for every unspent transaction output (utxo). This state is called the utxo set.
For your node to know if a payment to you is valid, it needs to be able to verify if an output paying you *actually* has that much bitcoin.
The only way to get to a valid view of the utxo set in a completely untrusted way is to download every block and build up this state by verifying every transaction that has ever happened.
Right, but I could just create the wallet, the receive address give it to somebody and get a message the the software is syncing and until then it cannot fully verify the transaction, right?
yup, bitcoin core alerts you of 0 conf transactions
Not if it's still syncing right? That's my beef.
It doesn’t let you generate addresses ? Yeah there’s no technical reason why it couldn’t. It’s just bip32 which is completely independent from anything onchain/syncing.
It’s really hard to make changes to core since theres a lot of cruft and everyone is overly cautious of merging stuff. So it may not have the optimal wallet experience.
It’s great for coinselection and working with watchonly wallets with hardware wallet descriptors though once it’s synced. This is the *ideal* way to use core imo, but more advanced.
You don’t want keys on your computer, it’s best to just let core be a way to generate addresses from your hardware wallets and check balances.
Yes, but you wouldn’t be able to verify whether the chain you are looking at is valid. Therefore you can not “safely” receive
Right, but that could be a message that it is still syncing and thus it cannot fully guarantee the funds, but a payment has arrived.
Has a payment-that-is-not-guaranteed really arrived? Users have been tricked sooo many ways.
What if the software used 3 or 4 visible nodes to verify the transaction while its syncing?
Like, the wallet could start downloading blocks from the beginning to sync AND from the current time to quickly verify. If all connecting nodes agree that this is new, the risk should be minimized to almost zero.
It's a beautiful process but not perfect. I don't follow the details but know it's been worked on since the beginning.
you might be able to do it with assumeutxo
Yes, this is still bad UX.
I wish we had more compact-block-filter-based wallets, those sync only for a few minutes initially. E.g. Ginger wallet works like this.
You don't have to sync the entire Bitcoin blockchain. You can run a pruned node which means you download just the last xxxx blocks. Normally okay but you can get issues when you run a deeper wallet. Also if you want to restore an older wallet with a pruned node it will. not find any transactions.
Yeah, but I can't run a pruned node without creating a wallet first to give it config to track. And I can't create a wallet if I don't have it fully sync. Or I have to prune to nothing, let it sync, create a wallet, erase the DB and sync again with that wallet in the config files.
Also, I don't even have an option to choose to prune in the UI yet. How are normals supposed to do this?
Pruning simply tosses the oldest #Bitcoin blocks once you're synced, but you actually DO still have to download the entire #BTC blockchain to verify all blocks before it can toss the old ones. 🤙
Correct but when it is ready you only have the last xxxx blocks for wallet scans
Yeah, but he's specifically complaining about the #Bitcoin / #BTC node sync speed hindering wallet creation & a pruned node won't fix that issue. 🤷♂️
If he just needs an address to send to ASAP, then there is a better solution. 🤙
This is the exact usecase for assumeutxo. You can use it in Bitcoin Core v29 but it's not the most user friendly experience.
All you need is the utxo set to know if a tx you recieved is valid. Meanwhile the node syncs the chain in the background to eventually validate that the assumed utxo set is indeed the correct one.
See https://blog.lopp.net/bitcoin-node-sync-with-utxo-snapshots/
Fuck #Bitcoin / #BTC Core. 🤙
you can just generate an address and check it on mempool.space
How does your wallet verify that a tx sent to your wallet is valid? How does it know the inputs in the tx are in the UTXO set if it hasn’t verified the whole blockchain?
Can't it ask for the blocks this transaction's coins are coming from? If all 10 connected nodes send the same old blocks, it's which trustworthy. There is always a risk, but nothing that simply warning msg can't solve. It's similar to the 0-conf stuff.
The purpose of syncing and verifying the chain is to (without trust) read the global state, ie the utxo set. If you don't care about showing the balance of your new wallet, then you can delay syncing, sure.
To inculcate virtue of patience :-) .. what is the hurry 😂
#btcfail
Why not just use a reputable wallet app until you can sync your own #Bitcoin / #BTC node? 💁♂️
You can always just open that wallet once the sync is complete, or send it to a fresh wallet you make after the sync. 🤙
The real answer is likely "because it didn't seem like such a big deal 900,000 blocks ago."
If only there was a fork of Bitcoin core that meets your requirements...
Depends on the wallet. You can easily create a paper wallet and send to it without any knowledge of the blocks history. You can also verify via a block explorer that btc had arrived to your wallet. You can also spend it without the full chain by creating a transaction offline and then broadcasting it to the btc network. If it's valid, it will be added to the blockchain or rejected if something is wrong.