0

As far as I know, every full node has a copy of the ledger (or its view) stored locally.

A Generic Question: Which blockchain (ledger) do we query as a client?

In my question query is a generic term, it can be to look up, check a transaction etc.

Do we need to query multiple full nodes to get a common view of the nodes?


The following questions are also related to the above question.

Question: Is there one (public) ledger built from the common view of the full nodes?

If the answer to the 2nd question is: no, then why don't we build one unique ledger which is the common view of the majority of the full nodes in the network?

A More Specific Question: If we don't have one ledger, then how do we (as a client) realize that our transaction has got enough confirmation? Do we need to ask many full nodes to realize that?

2

I'll try to answer each question as simply as possible, and hopefully give an overview of your misconceptions.

Which blockchain (ledger) do we query as a client?

We query the nodes that our client is connected to.

Do we need to query multiple full nodes to get a common view of the nodes?

We don't need a common view of the nodes. That's not too important. What is important is a current view of the latest blocks, and which transactions our node has been notified about. This is how we know which transactions have been confirmed (because they are in a block), and which have been broadcast over the network (because we have seen them).

Is there one (public) ledger built from the common view of the full nodes?

Yes and no. Yes, various companies and entities gather information on the state of nodes, and then provide an interface to the public to view information on those nodes, and the overall state of the network. This is what a block explorer does. However...no, this is not a part of the Bitcoin network, and clients do not and should not rely on them.

If the answer to the 2nd question is: no, then why don't we build one unique ledger which is the common view of the majority of the full nodes in the network?

If one unique ledger was the common view, whom would you trust to run that ledger? This is specifically the problem that Bitcoin has solved. Bitcoin is a method of coming to consensus on the state of that ledger, without requiring a central trusted authority. If we were okay with a central ledger, then we wouldn't need a blockchain, and Bitcoin would serve no use.

If we don't have one ledger, then how do we (as a client) realize that our transaction has got enough confirmation? Do we need to ask many full nodes to realize that?

Confirmations don't come from nodes. A confirmation is what happens when a transaction is included in a block, and that block is accepted by the network. Each additional block that is accepted on top of the block including the transaction, is an additional confirmation of the transaction. It has nothing to do with the number of nodes that relayed the transaction. As such, we can query a single node for the latest blocks, and count the confirmations of a transaction by counting the blocks backwards until we reach the one with our transaction. If the proof of work on those blocks checks out, then there is almost no chance that the single node has lied to us about the state of the blockchain. It would be far too much work for that node to spoof. Even if they had the computing power to do it, they would have missed out on a fortune in mining just to be able to lie to you about the state of one transaction. In other words, the verifying the proof of work calculations on the blocks a node provides proves the node is honest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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