Whether there are viruses on a blockchain and how to resist them?

The computer virus lives, copying itself from the machine on the machine without the purposeful action of the person. It would be more difficult to extend a virus in a blockchain and is for certain more expensive because he should pay another side for the right of interaction with it, and the network quickly would calculate its public key, brought down its reputation rating and would not confirm it to the transaction. Even if the virus successfully changed a chain to more than 51% of machines, the change history will exist on thousands of computers worldwide, therefore, it would be “easy” to be rolled away to the known good shape and to continue processing from there.

Here it is necessary to mark that there is a huge number of absolutely different blockchains. Everyone has the properties and the size.
The virus can be launched on an own blockchain to provide communication and monitoring. It can be used as protection against dismantling and tracing, but overhead costs of the start of such blockchain do it by rather a difficult process.