2

Since Bitcoin validates transactions by the majority of peers, and stacks ALL transaction history chain to some kind of hash, is then the following statement true?

Only one transaction can happen at the same time. And only when it's processed completely, other transaction can be processed.

If yes, will that be very slow? Considering a transaction must be broadcasted to majority nodes to complete.

If not, how does Bitcoin achieved that? (I assume not)

3

No, that is not correct. Transactions can happen in parallel, asynchronously, and do not need to wait their turn.

When someone creates a transaction, they send the transaction statement to their peers. Those peers verify the validity of the transaction, i.e. they check whether it adheres to the rules of the protocol, then in turn will inform their peers about the transaction, so that the news of a new transaction cascades through the network quickly. The nodes will relay transactions as they get to know them, so a lot of transactions can be spread around the network at the same time.

As you can see, different nodes will know about different transactions at the same time. That's fine though, because order doesn't matter at that point unless transactions depend on each other. This uncertainty gets resolved, once a transaction gets included in a block, which we call "confirming a transaction".

As miners learn of a new transaction, they'll include it in their set of transactions that they are trying to confirm. When a miner succeeds and finds a new block, this block includes the list of transactions that they wrote into the block. All these transactions are considered confirmed by the block, the block represents an atomic increment of the network's state. Just as transactions before, the block will then get relayed through the network.

As other nodes receive the block, they verify that it is valid, and subsequently update their local representation of the network's state: They update their blockchain, remove consumed and add new transaction outputs to their "Unspent transaction outputs pool", and remove confirmed transactions from the "Unconfirmed transaction pool".

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.