1. Is it safe for the hosting node to run smart contract? What if someone writes a malicious contract and try to give instructions the hosting node?

  2. Can smart contracts trust hosting nodes? Hosting nodes will have full visibility on what is happening during runtime. Can smart contracts safely handle sensitive information?

  3. Is there "sandboxing" around Solidity to prevent this kind of malicious interference?

1 Answer 1

  1. Smart contracts run in a VM called the Ethereum Virtual Machine (EVM). Unless there are exploitable bugs in the implementation of the EVM, code running in there can't break out and do malicious things. Bugs like that are possible, but the EVM is not very complex, so bugs like this are unlikely. Note that smart contracts aren't necessary for there to be this sort of bug. A client written in C++ could store transaction data in too small a buffer and have a buffer overflow. Any normal transaction could then trigger it.
  2. Everything on the blockchain is fully public to anyone. So no, contracts can't handle "sensitive" (if that means "secret") information.
  3. The EVM is a sandbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.