I was about to create my first smart contract which I came across these questions:
Where exactly the contract code gets stored, I read that it kind of stores in blockchain so does that mean every node that has an instance of a full blockchain has the contract code too?
Should a miner in order to mine a new block first run all the contract calls and set the values and then start too looking for POW puzzle solving and nonce value, and if so then can we have ASIC miners for ethereum like bitcoin, because they can do only a specific job but running a contract codes are different every time?
When a miner wants to verify a transaction which has a contract call should it run the contract code? if so, does it mean that each contract gets to run multiple time until finally one miner can find the right nonce and solve the pow puzzle? if that's true it means the contract code gets to run many times unnecessarily?
Where do the values of contract variables store, I mean if we have a solidity mapping it can contain lots of key values, so where does this key, values stores? if they store in blockchain then they should be stored in every node that has a copy of blockchain which means a massive data gets to store over and over and over again, and that would be such a storage waste
When a contract Self-destructs what exactly happens, it mentioned that the code will be removed from blockchain, so does it mean a transaction make it unavailable for following transactions or it really really alter the blockchain and remove it coded from older blocks?