My thinking here was that you cannot have miners give preferential treatment to the block with the largest number of transactions. This is because a deceptive miner could generate a large number of spam transactions without broadcasting them. Any block they solve could be padded with their secret tx's, artificially giving their blocks preference on the network.
Instead, if miners were to see 2 blocks solved nearly simultaneously, they could switch to whichever chain gave the smallest unconfirmed tx pool.
- snip -
How does your solution prevent the miner that "generates a large number of spam transactions without broadcasting them" from broadcasting those spam transactions along with their block?
Then all other blocks will not be chosen, since they leave all those spam transactions in the unconfirmed pool.
Won't this create an incentive for every miner to create as many spam transactions as possible to fill the pool of all other miners?
Danny, you're correct. This would reward exactly the negative behavior you've outlined. Thanks for the help!