Bitcoin Forum
June 19, 2024, 10:16:56 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Newbie question about block mining racing.  (Read 924 times)
lontivero (OP)
Full Member
***
Offline Offline

Activity: 164
Merit: 128

Amazing times are coming


View Profile
December 01, 2014, 08:12:18 PM
 #1

Hi,

there is something that I don't understand very well and I hope you could help me. Just imagine there are 2 nodes (node A and node B), each maintains a list of unverified transactions
* Node A has tx1, tx2 and tx3
* Node B has tx1, tx3 and tx4

Then they both decide to include them all in a new block and start mining. Node A finds the hash first so, it includes its block in the blockchain and publishes it. That is what I understood however I don't know how Node B should behave because it has 2 transactions in common with A.

- Should Node B to stop mining its block?  

And my last question (at least for a couple of days) is:

- How do nodes decide how many transactions to include in a block?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4669



View Profile
December 01, 2014, 08:43:16 PM
Last edit: December 01, 2014, 09:43:58 PM by DannyHamilton
 #2

Hi,

there is something that I don't understand very well and I hope you could help me. Just imagine there are 2 nodes (node A and node B), each maintains a list of unverified transactions
* Node A has tx1, tx2 and tx3
* Node B has tx1, tx3 and tx4

Then they both decide to include them all in a new block and start mining. Node A finds the hash first so, it includes its block in the blockchain and publishes it. That is what I understood however I don't know how Node B should behave because it has 2 transactions in common with A.

Exactly the same way as it should if it has 0 transactions in common with A (or all of its transactions in common with A).  The number of transactions in common doesn't matter.

- Should Node B to stop mining its block?  

Yes.  Always.  As soon as you receive a completed block, you should stop mining the block you were working on, and should begin mining a new block.

And my last question (at least for a couple of days) is:

- How do nodes decide how many transactions to include in a block?

It is up to the solo miner (or mining pool) to choose which transactions they want to include.  Most pools (and solo miners) run software that makes those decisions based on some pre-set conditions configured in the software.
lontivero (OP)
Full Member
***
Offline Offline

Activity: 164
Merit: 128

Amazing times are coming


View Profile
December 01, 2014, 09:32:41 PM
 #3

Hi,

there is something that I don't understand very well and I hope you could help me. Just imagine there are 2 nodes (node A and node B), each maintains a list of unverified transactions
* Node A has tx1, tx2 and tx3
* Node B has tx1, tx3 and tx4

Then they both decide to include them all in a new block and start mining. Node A finds the hash first so, it includes its block in the blockchain and publishes it. That is what I understood however I don't know how Node B should behave because it has 2 transactions in common with A.

Exactly the same way as it should if it has 0 transactions in common with A (or all of its transactions in common with A).  The number of transactions in common doesn't matter.

- Should Node B to stop mining its block?  

Yes.  Always.  As soon as you receive a completed block, you should stop mining the block you were working on, and should begin mining a new block.

And my last question (at least for a couple of days) is:

- How do nodes decide how many transactions to include in a block?

It is up to the solo miner (or mining pool) to choose which transactions they want to include.  Most polls (and solo miners) run software that makes those decisions based on some pre-set conditions configured in the software.


Thank you, @DannyHamilton.
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!