Bitcoin Forum
May 02, 2024, 09:22:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Some questions about Nakamoto consensus.  (Read 235 times)
YYBNN (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 21


View Profile
January 09, 2022, 03:56:37 AM
Merited by o_e_l_e_o (4), BlackHatCoiner (4), ABCbits (2), odolvlobo (1)
 #1

It might be bit too elementary to ask here, but let me ask some questions. I am learning about Bitcoin. Currently, I’m learning about distributed consensus on chapter 10 of mastering Bitcoin by Andreas Antonopoulos.

As far as I read, you can summarize this with 3 parts for Nakamoto consensus. The first is for full nodes to validate transactions. They make sure conditions including AcceptToMemoryPool, CheckTransaction, and CheckInputs in Bitcoin Core. Once transactions are ok, each node put them into a transaction pool.

Then, miners make a candidate block and do mining. (I think every node is independent, so transaction pool is slightly different among nodes so each miner mines a block consisting of different transactions, but mostly likely with the same previous block hash on the longest chain. I hope I'm getting it right.)

Once a block is mined by some miner, the miner propagates to its neighbor nodes, and each node checks. If a block is correctly mined satisfying conditions like CheckBlock and CheckBlockHeader in Bitcoin core, they put it on the ledger, and propagate and other nodes also check it if they haven't yet.

To fully understand, I should probably need to run a node and see, but I’m thinking about the risk of a majority of full nodes not doing jobs right. The first and the last step where full nodes validate, they could simply validate an invalid block to be valid and propagate to its neighbors. And, I totally understand an argument like other nodes will not validate and won’t talk to that bad node. However, we never know that if some malicious groups trying to break Bitcoin’s consensus system especially because it doesn’t cost a lot to be a full node.  To get 51% of hash rate is very expensive, but say you make so many bad full nodes and trying to mess up the ledger sounds reasonable.. Like run 100000 nodes and validate poorly. (Quick search shows 15000nodes currently)

Now, if so many nodes are bad, then miners will stop talking to them and only good nodes will hear new blocks, but my point is that the health of the network is not obvious. Therefore, some attacks could be possible here, what's making it not to be attacked? (Miners also can lie, but if their blocks get rejected, they lose money. Nodes try to be honest if they make transactions themselves to make sure their transactions went ok, so some incentives for nodes to act well.)
1714684944
Hero Member
*
Offline Offline

Posts: 1714684944

View Profile Personal Message (Offline)

Ignore
1714684944
Reply with quote  #2

1714684944
Report to moderator
1714684944
Hero Member
*
Offline Offline

Posts: 1714684944

View Profile Personal Message (Offline)

Ignore
1714684944
Reply with quote  #2

1714684944
Report to moderator
1714684944
Hero Member
*
Offline Offline

Posts: 1714684944

View Profile Personal Message (Offline)

Ignore
1714684944
Reply with quote  #2

1714684944
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714684944
Hero Member
*
Offline Offline

Posts: 1714684944

View Profile Personal Message (Offline)

Ignore
1714684944
Reply with quote  #2

1714684944
Report to moderator
1714684944
Hero Member
*
Offline Offline

Posts: 1714684944

View Profile Personal Message (Offline)

Ignore
1714684944
Reply with quote  #2

1714684944
Report to moderator
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
January 09, 2022, 05:12:11 AM
Merited by ABCbits (2), Pmalek (2), n0nce (2)
 #2

Nakamoto consensus.
You mean "Bitcoin" consensus.

Quote
I think every node is independent, so transaction pool is slightly different among nodes so each miner mines a block consisting of different transactions, but mostly likely with the same previous block hash on the longest chain. I hope I'm getting it right.
That's correct.
Miners nowadays connect to a pool that is running a node and builds the blocks, so multiple miners connected to a pool are mining the same block.

Quote
I’m thinking about the risk of a majority of full nodes not doing jobs right.
It doesn't matter what others do; when you are running a full node you rely on your own verification so there is no "risk" here.
The only negative thing about large number of malicious nodes is them wasting your time to verify an invalid block, reject it and ban them.

Quote
However, we never know that if some malicious groups trying to break Bitcoin’s consensus system
They can not break anything. If they accept invalid blocks they essentially isolate themselves since they stop on that block and can't build on it while the rest of the network keeps on building on the correct chain.

Quote
make so many bad full nodes and trying to mess up the ledger
Just like mempool, every node has its own blockchain (the ledger) and nobody else can mess it up for them.

Quote
Therefore, some attacks could be possible here, what's making it not to be attacked?
It is an attack but it is a pointless one since it can not achieve anything or be sustained.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
January 09, 2022, 05:15:26 AM
Merited by BlackHatCoiner (2)
 #3

If you propagate an invalid block, then your node would just be disconnected and added to the ban list of each node. This makes sure that only the malicious block of nodes are segregated from the others but not the honest nodes. This doesn't actually affect the rest of the network as they would just wait to get an honest peer which doesn't propagate invalid blocks.

It is perfectly possible to execute a Sybil attack against the network, and the attack that can happen would be an eclipse attack. However, Core has countermeasures against it as well.

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

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

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

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

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

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











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











▄▄▄▄█
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
January 09, 2022, 08:04:42 AM
Merited by BlackHatCoiner (2), ABCbits (1)
 #4

To fully understand, I should probably need to run a node and see, but I’m thinking about the risk of a majority of full nodes not doing jobs right. The first and the last step where full nodes validate, they could simply validate an invalid block to be valid and propagate to its neighbors. And, I totally understand an argument like other nodes will not validate and won’t talk to that bad node. However, we never know that if some malicious groups trying to break Bitcoin’s consensus system especially because it doesn’t cost a lot to be a full node.  To get 51% of hash rate is very expensive, but say you make so many bad full nodes and trying to mess up the ledger sounds reasonable.. Like run 100000 nodes and validate poorly. (Quick search shows 15000nodes currently)

Now, if so many nodes are bad, then miners will stop talking to them and only good nodes will hear new blocks, but my point is that the health of the network is not obvious. Therefore, some attacks could be possible here, what's making it not to be attacked? (Miners also can lie, but if their blocks get rejected, they lose money. Nodes try to be honest if they make transactions themselves to make sure their transactions went ok, so some incentives for nodes to act well.)

The important thing to note is that nodes that disagree simply stop talking to each other. Even if some malicious actor adds 100,000 "bad" nodes to the network, the 15,000 "good" nodes (and miners) will just ignore them and continue on. An eclipse attack (where the good nodes have trouble finding other good nodes) as @ranochigo mentioned is a possibility, but it would still not be fatal to the network.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
January 09, 2022, 04:52:10 PM
 #5

Quote
However, we never know that if some malicious groups trying to break Bitcoin’s consensus system
They can not break anything. If they accept invalid blocks they essentially isolate themselves since they stop on that block and can't build on it while the rest of the network keeps on building on the correct chain.
Even if they don't stop on that block, but continue adding either more invalid or the incoming new legit blocks (even though the previous block hash won't match - they're not following the rules anyway), it will result in two separate, not inter-communicating networks. The legit Bitcoin network and the fake Bitcoin network which has one or more invalid blocks.

Since nobody will talk / connect to the fake network, nobody will be harmed by it; hence it's not really an attack altogether.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4613



View Profile
January 09, 2022, 06:24:04 PM
 #6

You are describing any of the many bitcoin "fork" coins out there (Bitcoin Cash, Bitcoin SV, Bitocin Gold, etc).  In each of these instances a group decided to create blocks that are invalid according to Bitcoin.  They all decided to run nodes that would accept these invalid blocks, and to run miners that would mine these invalid blocks.  The result is a chain split where some nodes follow the new rules and are therefore on a forked network with a forked chain, and others continue to follow the old rules and are still on the old network with a completely separate chain of blocks.

That's exactly what happens any time any group would try to accomplish this, regardless of whether they have 5 nodes and miners or 5 billion nodes and miners. Their blocks are accepted by those that are running their software, and are ignored by anyone not running their software.
YYBNN (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 21


View Profile
January 11, 2022, 10:31:00 AM
 #7

Got it, they get isolated in P2P network because honest guys won't talk to them. Maybe there are papers in research level, but it would be interesting to visually see them as a network like nodes and minders are points and they are connected by an edge if they talk each other. I think dishonest guy would be disconnected. There is https://bitnodes.io/ which has some info, but I don't think it has data about if they are connected like they are talking. Are there such data so one can analyze?

 
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
January 11, 2022, 07:27:03 PM
 #8

Got it, they get isolated in P2P network because honest guys won't talk to them. Maybe there are papers in research level, but it would be interesting to visually see them as a network like nodes and minders are points and they are connected by an edge if they talk each other. I think dishonest guy would be disconnected. There is https://bitnodes.io/ which has some info, but I don't think it has data about if they are connected like they are talking. Are there such data so one can analyze?
I suspect the ones on bitnodes are all connected and talking, since the site's probing nodes won't accept misbehaving nodes as 'valid' and won't add those to the graph / data.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
January 12, 2022, 03:53:36 AM
 #9

Got it, they get isolated in P2P network because honest guys won't talk to them. Maybe there are papers in research level, but it would be interesting to visually see them as a network like nodes and minders are points and they are connected by an edge if they talk each other. I think dishonest guy would be disconnected. There is https://bitnodes.io/ which has some info, but I don't think it has data about if they are connected like they are talking. Are there such data so one can analyze?
I suspect the ones on bitnodes are all connected and talking, since the site's probing nodes won't accept misbehaving nodes as 'valid' and won't add those to the graph / data.
They aren't connected to each other, they are listening nodes that can accept incoming connections and "talk" to any node that instantiates the connection. What we don't know is which nodes are connected to which nodes which seems to be what @YYBNN wants to see.
BTW many of the IP addresses listed on bitnodes.io specially in first pages are fake/spy nodes.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
January 13, 2022, 02:52:56 AM
 #10

Got it, they get isolated in P2P network because honest guys won't talk to them. Maybe there are papers in research level, but it would be interesting to visually see them as a network like nodes and minders are points and they are connected by an edge if they talk each other. I think dishonest guy would be disconnected. There is https://bitnodes.io/ which has some info, but I don't think it has data about if they are connected like they are talking. Are there such data so one can analyze?
The methodology that Bitnodes used to find and determine Bitcoin nodes is inaccurate. The crawler essentially asks the nodes for their version and waits for a response and then subsequently requests for the other peers as well. This doesn't provide an accurate representation of the network as a whole. In fact, there is no way to actually accurately determine the node size.

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

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

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

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

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

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











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











▄▄▄▄█
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
January 13, 2022, 11:16:17 PM
 #11

Got it, they get isolated in P2P network because honest guys won't talk to them. Maybe there are papers in research level, but it would be interesting to visually see them as a network like nodes and minders are points and they are connected by an edge if they talk each other. I think dishonest guy would be disconnected. There is https://bitnodes.io/ which has some info, but I don't think it has data about if they are connected like they are talking. Are there such data so one can analyze?
The methodology that Bitnodes used to find and determine Bitcoin nodes is inaccurate. The crawler essentially asks the nodes for their version and waits for a response and then subsequently requests for the other peers as well. This doesn't provide an accurate representation of the network as a whole. In fact, there is no way to actually accurately determine the node size.
True, I already heard a few times that the number seems to be much smaller than the actual network size, apparently. But it's hard to crawl reliably; amongst other factors also since many nodes are e.g. just accessible via Tor and such. However, this is somewhat by design.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!