As far as I am concerned, when a function in a smart contract is defined as pure or view it is possible to invoke it without being charged for the gas consumption that its execution requires. This type of functions do not alter the state of the smart contract and thus not need to be executed and mined as a new block in the blockchain.
However, this behaviour would open the door to abuse. Anyone could try to repeatedly invoke this type of functions on a particular node to put it to work without rewarding it.
So, I would like to know if I am right or wrong in stating:
Pure & view functions can be abused because anyone can invoke them without paying for their execution.
Pure & view functions are executed off-chain since their execution does not alter the state of the contract.
When executing off-chain the function is typically executed on a single node, the one used as provider (e.g., a local geth node or a remote Infura node).
If 1. is correct, is there a way to prevent this from happening? I don't mean a way to to limit long executions but a way to limit multiple invocations of a single function by some accounts. This is something I wanted to clarify since the question was marked as a possible duplicate of View/Pure Gas usage - Cost gas if called internally by another function?
I can think of firewall-based solutions but does Ethereum clients like Geth provide any sort of countermeasure? Can this problem be tackled at solidity level? It comes to my mind making all my functions non-static but this would be detrimental for honest users.
If 2 and 3 are correct, I can think of remote dishonest nodes returning wrong results to the client. So I guess, this is not necessarily true and there is a way to force invocations to pure/view functions to be executed distributedly. In that case, would the execution of the function have any impact on the blockchain if the function is not changing anything on the contract? Would any gas be charged to the client?
Thanks for your comments!