Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: cafter on April 01, 2023, 10:58:18 AM



Title: how Bitcoin Core software implement the consensus rules
Post by: cafter on April 01, 2023, 10:58:18 AM
how Bitcoin Core software implement the consensus rules that define the valid format and structure of Bitcoin transactions,
and how does it ensure that all nodes in the network agree on the validity of each transaction through the process of transaction verification?
and this frustrating captcha ... :-[ :-[ :'(


Title: Re: how Bitcoin Core software implement the consensus rules
Post by: ertil on April 01, 2023, 11:46:19 AM
Quote
and this frustrating captcha
Look into your calendar. Or this topic: https://bitcointalk.org/index.php?topic=5447077.0

Edit: Posted without solving captcha, it can be easily skipped if you want.

Quote
how Bitcoin Core software implement the consensus rules that define the valid format and structure of Bitcoin transactions,
There are many rules, you can download and read the code here: https://github.com/bitcoin/bitcoin/

Quote
and how does it ensure that all nodes in the network agree on the validity of each transaction through the process of transaction verification?
1. By checking Proof of Work of the whole chain. The strongest valid chain is the correct one.
2. The valid chain is determined by the code, as I mentioned, there are many rules, and each full node has to independently validate everything from the very beginning, to the latest block.


Title: Re: how Bitcoin Core software implement the consensus rules
Post by: sha420hashcollision on April 01, 2023, 06:50:37 PM
how Bitcoin Core software implement the consensus rules that define the valid format and structure of Bitcoin transactions,
and how does it ensure that all nodes in the network agree on the validity of each transaction through the process of transaction verification?
and this frustrating captcha ... :-[ :-[ :'(

dont worry about captcha its april fools joke lol (https://bitcointalk.org/index.php?topic=5447077.0)


Title: Re: how Bitcoin Core software implement the consensus rules
Post by: odolvlobo on April 03, 2023, 12:24:19 AM
how Bitcoin Core software implement the consensus rules that define the valid format and structure of Bitcoin transactions,
and how does it ensure that all nodes in the network agree on the validity of each transaction through the process of transaction verification?

Each node validates the transactions and blocks that it receives. It rejects any that are not valid. The implementation is in the node's software.

A node does not ensure that all nodes agree. Consensus is not enforced, it is only followed.

If a node considers a block to be valid when other nodes consider it to be invalid, then the chain will diverge into two branches, and that is called a fork. Nodes that consider one branch to be valid will follow that branch, and nodes that consider the other branch to be valid will follow the other branch.