And there is a question that is kind of messing with me. I don't have enough knowledge to answer it but these jsons that have been being included in transactions are somehow using some space, right? So, if there is this space available, why can't it be used to include even more transactions in a block? Isn't it viable? Why is there this space available and ready to be filled (now) with this spam jsons? Why can't this space be used to improve the efficiency of the blocks and blockchain in terms of number of transactions per block, at least?
Number of transactions per block depends on the size of each transaction. After SegWit soft fork, it
also depends on how many of them were using SegWit; the more SegWit transactions, the bigger the block and the higher the number of transactions in that block up to 4 MB. The smaller each transaction, the bigger the number of transactions in the block.
Take these two blocks, even though they are both special/extreme cases but are also good examples:
367,853 and
786,501The first one is pre-SegWit so the max size is 1 MB (or 999,956 bytes to be exact) however it contains 12,239 transactions simply because the transactions in that block are among the smallest sizes possible*.
The second one is post-Taproot/post-Ordinals-Attack and the size is 3,978,938 bytes however it only contains 39 transactions simply because it contains
a spam transaction of 3,969,494 bytes where the attacker pays $13500 to include that tx in this block!
* These are special cases that are not normally possible. In short this block is cleanup of another attack against bitcoin where the attackers flooded the chain with outputs with 0 satoshis paying to OP_TRUE.
So, let me see if I understood.
This spam transaction only went into the block just because the fee value was high enough to go with higher priority than any other, right? The other 39 transactions are already normal Bitcoin transactions that had higher fees than others in the mempool, yes?