0

Let me make sure I've got this correct.

In order to find out how much "value"(sats) an address holds the wallet needs to go through each block in the blockchain and check if it ever received any coins?

Is there a quicker way to do this? Wouldn't a wallet(Trezor, Ledger, Hot wallet app, exchange) need to record & index every public address in the block chain with sats on it to be able to keep track of this?

2 Answers 2

3

Hot wallets that are not full nodes and as a result don’t have a local database to query, get the address info by querying a centralized service set up by their creators.

For example ledger comes with a companion app called ledger live that queries ledger.com for the current balance of each address etc. As a consequence they know which addresses you own by monitoring the queries.

If you are talking about ledger/trezor the hardware device, those don’t know and don’t care how much coins are in each address, they are only instructed by the desktop software to perform signing operations and the desktop app handles the rest.

1

Yes, a wallet needs to independently read and verify the whole blockchain to know what amounts of money are under its control.

There's no quicker way to do this without some loss of security.

There are mitigations like pruning and caching that avoid repeating work already done.

There are arguably riskier approaches like SPV or lightweight wallets. However, Bitcoin depends on their being a relatively large and healthy community of full nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.