From my understanding, the
memory pool (or
transaction pool) contains "open" or "unconfirmed" transactions that have to be validated and can be chosen (arbitrarily?) to be part of a "candidate block". For this block, the hash puzzle in a
proof of work blockchain has to be solved before it can be added as a valid block to the blockchain.
How do miners choose the transaction(s)?
Does the difficulty vary depending on the number of chosen transactions? If not, wouldn't it be advisable to include as many transactions as possible when trying to find a new "candidate" block (maybe depending on the reward - just currency units or also (or only) transaction fees for the transactions included in the block)?
If the difficulty varies based on the number of selected transactions, however, wouldn't it be best to just choose one transaction and then "quickly" (i.e. as the first) come up with a valid candidate block to be added to the blockchain?
If it makes sense to choose "all open/unconfirmed" transactions and then try to solve the hash puzzle (by, as I've read starting with a
0and then sequentially increasing it), wouldn't it simply boil down to the result that the miner with the largest processing power would always win?