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 6, 2018 in Blockchain by charlie_brown
• 7,720 points

recategorized Jul 7, 2018 by Vardhan 787 views

1 answer to this question.

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 6, 2018 by aryya
• 7,460 points

Related Questions In Blockchain

+1 vote
2 answers
0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

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

answered May 30, 2018 in Blockchain by Perry
• 17,100 points
3,579 views
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,400 points
1,285 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,900 views
+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
• 26,740 points
45,141 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,423 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP