When do we say transaction has occurred?
For a transaction to occur both the sender and the receiver must be within the network. I know I have confused you but don’t mind here is the light. This will involve sending and receiving bitcoin within a network called bitcoin network. For you to send a bitcoin to your friend let’s say, Monica. Both of you will be required to have a bitcoin wallet. The wallet would be responsible to keep track of all incoming and outgoing transactions.
Immediately you click the send button the bitcoin gets broadcasted within the network. After a short period, the Monica will receive notification that you have sent her a bitcoin. At this level, the miner plays its role by adding the transaction to the blockchain. Immediately the transaction is verified then it is recorded in the blockchain acting as a proof that the transaction really took place. Normally this transaction is irreversible.
What Really happens in this Bitcoin Network?
I introduced the wallet. By installing bitcoin wallet into your pc or mobile phone your wallet will be created. Among its major features is its ability to generate addresses which normally forms the foundation to transacting. In this scenario, you have to share the address with Monica. The fact that you can share this address with your friends it qualifies to be called public address. I know you are asking whether there is a private address. Yes, there is. It is referred to as a private key or the seed. This key plays a big role in ensuring that all transactions are signed and also acts as proof that the coin is coming from the true owner of the wallet. By signing I mean that when you sign any transaction it can not be tampered with by anybody. It will reach to Monica without any alterations.
We talked of your bitcoin being broadcasted in the network before Monica is notified. The broadcast can take even to a maximum of 20 minutes. During this time the mining process is normally initiated. Mining will involve a consensus distributed system upon which all pending transactions are confirmed. In order for the transaction to be verified, it will need to be packed in a block. This block in order to be verified it must pass through very strict cryptographic rules with it is within the network. The rules include restrictions that no block should be modified. This acts to secure any transaction added to the blockchain. No one can tamper with it.
Talking of blockchain. This is a shared public ledger upon which the whole Bitcoin Networks relies on. You will say a transaction has taken place only when it is recorded on the Blockchain. In the blockchain transactions are recorded in chronological order. It is the blockchain which gives the wallet the power to calculate the balance upon which you can transact with. Just as I said it is only after the transaction has been recorded in the blockchain that you say it has occurred. Once the transaction has been recorded you can not later change anything or even roll back your own spends.
That’s it you can now join a wonderful network and enjoy this security to your Bitcoin. You will also enjoy the fun of transacting with bitcoin.