Bitcoin Forum
May 14, 2024, 11:18:25 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Consensus Process (step-by-step). Feedback is welcome.  (Read 198 times)
Gramer (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 13, 2018, 01:51:41 PM
Last edit: November 14, 2018, 01:20:19 PM by Gramer
 #1

Hello,  Smiley

I am working on step by step Bitcoin Consensus Process and would love to get some feedback on this work Roll Eyes. Thanks in advance for your thoughtful comments Wink.


Update,
Version #2
Bitcoin Consensus Process

1. Wallet sends a transaction to the Node.
2. Nodes validate the transaction.
3. Nodes propagate transaction through the network.
4. Nodes are holding not confirmed transactions in their memory (mempool).
5. Nodes are solving a mathematical puzzle in order to create the block (mining).
6. Node who solves the puzzle first propagates new block through the network.
7. Nodes validate newly received Block.
8. Nodes add a newly received block to their local Blockchain.

Commentary
- To solve the puzzle (mining) takes approximately 10 minutes of computation.
- Mining process uses extensive resources of electricity. Economical factors force miners to concentrate in regions where electricity is cheaper.
- More than 75% of mining power controls 7 mining pools.
- Nodes choose what transactions to add to the block at its discretion. Usually, nodes add only transactions that pay the highest fees.
- Nodes determine transactions order in the block at its discretion.
- Nodes determine the time stamp of the block at its discretion.



Version #1
Bitcoin Consensus Process
1.   Wallet sends a transaction to the Node.
2.   Node checks account balance and accepts or rejects a transaction.
3.   Nodes gossips transaction through the network.
4.   Nodes are holding not confirmed transactions in their memory (mempool).
5.   Nodes are solving a mathematical puzzle (mining) approximately for 10 minutes. This process takes enormous resources of electricity.
6.   Winner Node (miner) or Pool of Nodes (mining pool) who solves the puzzle first. More than 75% of mining power controls 7 mining pools.
      6.1.   Node takes transactions from its memory. Node takes transactions at its discretion, usually transactions that pay the highest fees.
      6.2.   Node puts transactions into order. Node orders transactions at its discretion.
      6.3.   Node creates the block and the time stamp. Node creates the time stamp at its discretion.
      6.4.   Node puts ordered transactions into a newly created block.
7.   Nodes gossips new block through the network.
8.   Nodes review newly received Block and accepts or rejects it.
9.   Nodes add a newly accepted block to their local Blockchain.
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715685505
Hero Member
*
Offline Offline

Posts: 1715685505

View Profile Personal Message (Offline)

Ignore
1715685505
Reply with quote  #2

1715685505
Report to moderator
1715685505
Hero Member
*
Offline Offline

Posts: 1715685505

View Profile Personal Message (Offline)

Ignore
1715685505
Reply with quote  #2

1715685505
Report to moderator
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
November 13, 2018, 02:18:55 PM
 #2

2.   Node checks account balance and accepts or rejects a transaction.

There's no accounts and no account balance in Bitcoin. There's only inputs and outputs. Each node checks whether the inputs used for the outputs are unspent and whether the total sum of inputs is larger than or equal to the total sum of outputs (with the remainder being used as transaction fees).


5.   Nodes are solving a mathematical puzzle (mining) approximately for 10 minutes. This process takes enormous resources of electricity.
6.   Winner Node (miner) or Pool of Nodes (mining pool) who solves the puzzle first. More than 75% of mining power controls 7 mining pools.
      6.1.   Node takes transactions from its memory. Node takes transactions at its discretion, usually transactions that pay the highest fees.
      6.2.   Node puts transactions into order. Node orders transactions at its discretion.
      6.3.   Node creates the block and the time stamp. Node creates the time stamp at its discretion.
      6.4.   Node puts ordered transactions into a newly created block.

From the outside there's no difference between a single miner and a pool of miners. For their peers both look like a single node.

Solving the "mathematical puzzle" is not a separate process from building blocks. The cryptographic hash used as "mathematical puzzle" is used to essentially "seal" a block of transactions and its contents, with the solution being dependent on the contents of each block (which means the transactions need to be added to the block before the hash is applied, otherwise you get an empty block -- which also happens sometimes).

The 10 minute block intervals are achieved by adjusting the difficulty of the "mathematical puzzle" to a level that the whole network needs on average 10 minutes to find the correct solution (ie. an individual node doesn't care how long it mines, it just mines).

The order of transactions within a block is more or less irrelevant -- the hash would look different, but it's the order of the blocks on the blockchain that determines the transaction order.


There's a bit more to it but these are some of the more important points that are commonly misunderstood.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
YarkoL
Legendary
*
Offline Offline

Activity: 996
Merit: 1013


View Profile
November 13, 2018, 02:35:05 PM
Last edit: November 13, 2018, 02:56:01 PM by YarkoL
 #3

As pointed out by HeReTik, there are no balances. The nodes verify that the signed input
is unspent and corresponds to the private key that controls the amount sent.

Also, the steps outlined in 6 come logically before 5, since the set of transactions included
in the candidate block determine the Merkle root in the header, which again is hashed with the
rest of the block header in the process of mining.

“God does not play dice"
DooMAD
Legendary
*
Offline Offline

Activity: 3780
Merit: 3128


Leave no FUD unchallenged


View Profile
November 13, 2018, 08:43:21 PM
 #4

If you're going to expand on point 6, then point 8 might deserve a little bit more detail too.  I'd personally use "validate" in place of "review" for that one.  You'll probably find this page helpful in seeing just how much is involved when it comes to validation of a block.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Gramer (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 14, 2018, 10:32:45 AM
 #5

Thanks for all of you HeRetiK, YarkoL and DooMAD. Your comments were very useful.
I updated my first message. I would be grateful if you could review it.

Additional question.
Did Ethereum without Casper have the same consensus process as Bitcoin or it is different?
And did you know how consensus process would work for Ethereum with Casper?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!