I am currently reading an interesting book about solidity, and I'm reading about block creation. This gives a good overview:
The book mentions that the maximum size of a block is determined by the upper gas limit and block size.
I am a bit confused as for when a new block needs to be created.
In another example, they give an example in which the gas value does not even reach the gasUsed
property of a block doesn't even come close to the gasLimit
.
So in the example added, Sam wants to add $$ to Mark. But it isn't clear to me how it is decided that a new block needs to be created.
I mean, a block consists of multiple transactions, so why wouldn't this transaction just be appended to an already existing block?
Related, everywhere I read that a new block gets created by the miner who 'solves the puzzle' based on a changing nonce. So who creates this puzzle?
Also related, they mention the 'genesis' block, which is the first block in a blockchain, but there is no puzzle for this, so who creates the first block? And in a blockchain, how is it decided that we need a new genesis block? Is the ' Ethereum blockchain' therefore a combination of blockchains (each having their own genesis block)?
I know, quite a few questions... If you prefer me to split up these questions, I will. But as they're closely related, I would have hoped that a single answer could clarify these questions at once.