Let's say peer A is deployed a contract and exposes contract ABI. Peer B wants to join the same network.He have the ABI with him.But he wants to see the real contract code before joining the network.How peer B will be able to see that.
Unless Peer A has made the source code available, you will only be able to see the byte code (i.e., the compiled code).
Even if Peer A makes the source code available, however, you should still be cautious. If Peer A was malicious, he/she may have published source code with an identical ABI, but with different code behind the interface.
For this reason, if you really want to be ultra secure, you should get the source code, read it until you become comfortable that it does what it is supposed to do, and then compile it yourself into byte code. Not until you've confirmed that the byte code that you've compiled yourself is identical to what is running at the smart contract's address can you be certain that you fully understand what will happen if you send ETH there.
For example, this is the Golem factory contract (https://etherscan.io/address/0x7da82c7ab4771ff031b66538d2fb9b0b047f6cf9). As you can see, the source code has been "Verified." In this case, Etherscan performed the process I describe above, and you can be confident that the source and the byte code are identical.
Peer A should have posted it at
Otherwise, it is available on the block in question as bytecode. The EVM executes this bytecode when the contract is used: such as storing/changing data or using a
constant function. Of course, there's always bytecode to opcode converters.