How to prevent the smart contract from being modified and deployed in the blockchain network?

0 votes
This question is more to private blockchain frameworks such as Corda,Hyperledger, and others. In all this platforms is posible write some programs named chaincode, smart contracts, etc, that allow us to implement the business logic . All of this are deployed in each peer of the blockchain network, but how to avoid and detect that are deployed a different version of the code in some peers?

I'm talking that the final result of smart contract are the same, so the consensus not is committed, but yes some peers can modified the code that it run in for any reason.

how we can manage this scenario in private blockchain?
Jul 5, 2018 in Blockchain by charlie_brown
• 7,710 points

recategorized Jul 6, 2018 by Vardhan 33 views

1 answer to this question.

Your answer

Your name to display (optional):
0 votes
To expand on Matthew's answer, each state in a transaction is associated with a given contract. This contract is uniquely identified using a [contract name, hash of the JAR file containing the contract] pair.

If the contract is modified, this will modify the hash of the JAR containing the contract, and thus the contract JAR will no longer be considered valid.

As Matthew says, the transaction which contains (among other things) the information about which contract to use with each state is then digitally signed, preventing it from being modified.
answered Jul 5, 2018 by ariaholic
• 7,320 points

Related Questions In Blockchain

0 votes
1 answer


Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 16,450 points
0 votes
1 answer

How can I retrieve to and from address in transaction directly from blockchain?

The spending conditions, i.e., who is able ...READ MORE

answered Jul 11, 2018 in Blockchain by Shashank
• 10,330 points
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init


answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 27,620 points
0 votes
1 answer
