Author

Topic: Newbie question about block mining racing. (Read 939 times)

full member
Activity: 164
Merit: 126
Amazing times are coming
December 01, 2014, 05: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.
legendary
Activity: 3472
Merit: 4794
December 01, 2014, 04:43:16 PM
#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.
full member
Activity: 164
Merit: 126
Amazing times are coming
December 01, 2014, 04: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?
Jump to: