Bitcoin Forum
May 15, 2024, 11:56:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Some questions about Nakamoto consensus. on: January 11, 2022, 10:31:00 AM
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?

 
2  Bitcoin / Development & Technical Discussion / Some questions about Nakamoto consensus. on: January 09, 2022, 03:56:37 AM
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.)
3  Bitcoin / Development & Technical Discussion / Re: Research topics in Bitcoin on: June 14, 2021, 08:11:34 AM
@franky1 Thanks, among many papers in network topology topic, what papers would you recommend to start reading?
4  Bitcoin / Development & Technical Discussion / Research topics in Bitcoin on: June 09, 2021, 06:25:04 AM
Hi all, I would like to hear about research topics in Bitcoin. For instance, https://ieeexplore.ieee.org/document/7163021 breaks down to 3 parts: Network, Transactions, Consensus. There are some literatures which carefully studies Nakamoto's consensus from a careful mathematical argument, for instance https://eprint.iacr.org/2019/943.pdf

Obviously, there are IOHK research, Ethereum research for their own consensus and scaling, but I would like to work on Bitcoin. Hence I would like to ask for your opinions for some topics which really solve challenges in Bitcoin. I am not an expert in Crypto at all, in fact, I am learning now as I am very fascinated by Bitcoin, but I thought it would be more effective to learn with some mete problems in my mind. (My back ground is math with PhD, and have been publishing papers in graph theory and topology. I am mainly interested in layer 1, but open to stuff like lightning project.) If you could let me know, that would be amazing. Please let me know!
5  Bitcoin / Development & Technical Discussion / Re: Beginner's question on consensus. on: June 03, 2021, 09:45:04 AM
Thank you, learned a great deal!
6  Bitcoin / Development & Technical Discussion / Re: Beginner's question on consensus. on: June 03, 2021, 06:49:37 AM
@ranochigo

Thank you so much for your clear explanation and more knowledge, I lam learning a lot here.

<About Q1>
"When a node receives a transaction, it'll get validated and the node will remove the UTXO involved from their UTXO set. This means that every other transaction that spends the same UTXO will be invalid to the node as the node has already removed it. However, if you were to broadcast the transaction to two half of the network, then assuming equal propagation, each half will see different transactions. This is known as a race attack, where in a scenario that a merchant sees TX A but infact TX B with the same inputs and sent back to a different address is also propagated on the network. In this case, then whichever transaction that gets included in a block first wins."

I see, I understand this. I did not know the race attack, but this could certainly happen, but you can avoid by "whichever transaction that gets included in a block first wins."

Bit away from my original question. When you say "When a node receives a transaction, it'll get validated", this is to check if this transaction was not in anywhere of the block chain at that stage, I suppose. I am learning about SPV and learned that with merkle tree data structure and only block headers, it is easy to check if the transaction is contained in previous blocks.(https://learning.edx.org/course/course-v1:BerkeleyX+CS198.1x+3T2019/block-v1:BerkeleyX+CS198.1x+3T2019+type@sequential+block@f37bbffc45a84deabf346911b8d83178/block-v1:BerkeleyX+CS198.1x+3T2019+type@vertical+block@4fe65dfbf03e4cb48ef588b85af9e107) I believe each node validates in this way, am I right? Current block height is less than 700000, I guess this validation is computationally light.


"For example, if the transaction gets included at block height of 2, then the attacker will start mining at a block height of 2 with a rogue transaction until they outpace the network. Afterwhich, they broadcast that chain and they're able to effectively overwrite the other chain as it has a higher PoW."

I get this. Thank you. Just out of curiosity, if the longest chain gets hacked by 51% attack, what happened to the block rewards of miners who did the longest chain? I suppose it becomes zero, perhaps there is a code which executes at this event. And, I guess all transactions which were in the longest chain get put back to memory pool?

<About Q2>
Thank you, it is clear now. Again out of curiosity, little different topic, I know there is an upper bound in the size of blocks, hence, one can contain finitely many transactions. Is there any lower bound like you have to include at least k transactions from some k? I suppose, for hashing, it does not get better having less transactions. I heard also that miners get transaction fees besides of block rewards, so it is natural to put as much as transactions if the number of inputs transactions does not matter in the hashing race, which I think is the case.
7  Bitcoin / Development & Technical Discussion / Beginner's question on consensus. on: June 03, 2021, 03:34:43 AM
Hi, I have a question regarding consensus. Perhaps it is  It’s related to the double spending problem. So, I will speak in this context.

Let’s say bitcoin network only has 5 nodes. Jon has 10 bitcoin, and trying to give 10 bitcoin to Mike and Lisa, intending the double spending.

Q1)So firstly, I wonder whether this action is even practical in usual circumstances, like having a hot wallet. When Jon sends 10 bitcoin to Mike, it should deduct 10 bitcoin from his hot wallet immediately. So, how could Jon even try to double spend? No bitcoin…(Now, if Jon is trying to go to a public ledger, and redo the block by adding or deleting particular transactions, I get it this type of activity leads to the double spending. For the longest chain, I understand 51% hash power is necessary to do so.)

In short, I understand that Jon can send Mike and Lisa 10 bitcoin each at the very same time to do double spending, but is it even possible in a hot wallet situation (which I think is a usual circumstance for many people).

Q2)In any case, if Jon tries to send bitcoin, other four will check if this transaction is valid or not. Exactly, are they checking if Jon has enough founds by going back to the public ledger, and Jon is not doing the double spending also by going back to the public ledger? I suppose the answer is yes, but here I am starting to get confused because this is the point which PoW is coming in as two of four nodes could be Jon's, and they might lie. In my understanding, PoW plays a role to choose a representative who puts a block. I understand that it is a hashing race to get a certain value where inputs are all transactions to be included in a block, the past information from the previous block, and a nonce which you choose to get an ideal output. Hence, anyone who is participating to this hash race already knows which transactions they should include into the block. So, there should be a consensus before PoW that would check which transactions to be included?

Sorry it was a bit long and perhaps basic to some of you all, but if you could help me to clarify, that would be great.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!