I have a question (or more) regarding the block in blockchain and how it stores transactions. I don't know if this question is 100% related to multichain but i tried to google for answers but didn't find any.
I am doing a project where i create different blockchain networks with different block size. The only parameters that i change when i create those networks are: skip-pow-check = true and the block size = variable (it's manually changed for every network). The block time is set to 15 seconds.
Let's take a block with a size of 500KB. Over a period of 5 minutes i send transactions to the blockchain using the sendwithdata function (sendwithdata(addrs, coin_amount, data)). Here the data is 20 bytes (i send 20 "a" characters). The transaction has a size of around 250 bytes.
After 5 minutes of sending transaction my blocks look like this:
block 279 | 1796 tx stored |
block 280 | 950 tx stored |
block 281 | 13 tx stored |
block 282 | 1451 tx stored |
block 283 | 1669 tx stored |
block 284 | 1047 tx stored |
block 285 | 607 tx stored |
block 286 | 1537 tx stored |
block 287 | 240 tx stored |
block 288 | 1024 tx stored |
block 289 | 1341 tx stored |
block 290 | 1480 tx stored |
block 291 | 2666 tx stored |
block 292 | 2495 tx stored |
block 293 | 1056 tx stored |
block 294 | 2311 tx stored |
block 295 | 1354 tx stored |
block 296 | 1358 tx stored |
block 297 | 1016 tx stored |
block 298 | 1577 tx stored |
block 299 | 2225 tx stored |
block 300 | 441 tx stored |
block 301 | 2174 tx stored |
block 302 | 1142 tx stored |
block 303 | 12 tx stored |
block 304 | 2 tx stored |
Total of tx sent: 32984
So my questions are this:
1. Why such a big discrepancy between the amount of tx saved in each block? (block 229 -- 2225 tx stored while block 300 -- 441 tx stored)
2. Why sometimes my block is added to the blockchain before the 15 seconds block time?
3. Why the blocks never reach the full size (500KB), the maximum transactions size goes up to only 300KB. The other 200KB is some metadata, is reserved for the block header?
4. Can the transaction size be lower than 250 bytes, let's say under 100 bytes?
All of this happens even if the block is 5KB or 1MB, 10MB or 100MB
Again, i am sorry if this is not the right website to ask this question but maybe someone more knowledgeable than me can give me some answers.