It seems like part of the problem with blocks not including transactions is the maximum block size of 500kB. Doesn't this pose a scalability problem?
...
The size of the queue of unconfirmed transactions waiting for inclusion is known by your client but can't be viewed. It can be seen here:
http://bitcoincharts.com/bitcoin/txlist/. At this immediate moment, there are 2763 unconfirmed transactions (1454847 bytes). That would seem to me to be larger than the maximum blocksize indicated above, so the above rule about higher transaction fees may be kicking in on the miner's side for inclusion of transactions (but the client isn't prompting).
The size of the 0-confirm queue is shown in debug.log every time addUnchecked() is called just before a txn is stored in memory pool.
And that is called every time - so you can watch it count up with each txn or orphan and drop down with each block
e.g. just now: 06/18/12 21:13:21 addUnchecked(): size
1141That
1141 is the number of txns in the memory pool - that is the number of 0-confirm txns
Edit: though it is only correct if your bitcoind has been running for a while since you wont know all 0-confirm txns if you just started your bitcoind
Edit2: see here's what happens in debug.log when a block is found - just now - Ozcoin (with other stuff around it removed):
06/18/12 21:24:40 addUnchecked(): size
146506/18/12 21:24:50 SetBestChain: new best=000000000000007b3cb3 height=185186 work=359073512741370072393
06/18/12 21:24:50 addUnchecked(): size
1018So that block (185186) processed 448 txn's from the memory pool (+1 coinbase that wasn't in the memory pool as per expected)
244.80kB in size
Edit3: however the next block by Bitparking was (they ignored all 0-confirm txns):
06/18/12 21:30:13 addUnchecked(): size
111406/18/12 21:30:15 SetBestChain: new best=000000000000046b404d height=185187 work=359080312542205322700
06/18/12 21:30:19 addUnchecked(): size
1115That block (185187) processed 0 txn's from the memory pool
0.25kB in size
Edit4: the next block was again Ozcoin
06/18/12 21:46:40 addUnchecked(): size
146006/18/12 21:46:56 SetBestChain: new best=0000000000000732fdc3 height=185188 work=359087112343040573007
06/18/12 21:46:57 addUnchecked(): size
822So that block (185188) processed 639 txn's from the memory pool (+1 coinbase ...)
243.31kB in size
Edit5: and for the last edit
- the next block was Deepbit
06/18/12 21:49:04 addUnchecked(): size
86206/18/12 21:49:11 SetBestChain: new best=000000000000085b53c3 height=185189 work=359093912143875823314
06/18/12 21:49:12 addUnchecked(): size
689So that block (185189) processed 174 txn's from the memory pool (+1 coinbase ...)
49.80kB in size