I am working on a smart contract and trying to come up with ways through which I can make sure that each transaction sent to my Ethereum smart contract is only processed as part of separate block, that does not contain any other transaction related to my smart contract. Based on my own understanding and research on the subject, I believe that won't be technically possible as depending on network traffic, it is completely possible that multiple transactions for my smart contract are processed as part of the same block. Do you think there's any way around it - or not possible at all.
Your contract doesn't process transactions, the miners on the network do that.
Nevertheless, you could:
- Add at the beginning of your contract
uint256 public blockNumber;
- Add at the beginning of every non-constant function in your contract:
require(blockNumber < block.number);
blockNumber = block.number;
It's not too subtle IMO, but I guess it could do what you (for some reason) want to achieve.