creating your own bitcoin block I've just started reading about bitcoin, and I had this question, what if :

I created two bitcoin addresses.
added for example 1 btc to one of them.
then I start sending that 1 btc back and forth between the two
addresses till I complete one block but somehow I don't broadcast
those transactions.
I calculate the magic number.
broadcast the block and I claim the mining fee without any
competition.

I know there is something preventing this from being possible I just don't know what it is ?
thank you for time.
That is not how bitcoin works. You can't just &quot;add&quot; bitcoin to an address without a valid UTXO. There is not a minimum number of transactions required to create a block. A miner can create a block with no transactions included if they wanted, so the sending back and forth idea makes no sense. Calculating the magic number isn't something you can do on your own, all the other miners in the world are racing to solve for the same block, and once they do, you need to update your equation to solve for a new magic number. I think you need to do a bit more research on how bitcoin works.