Where does the smart contracts stored and executed on blockchain

+1 vote
I have just started creating smart contracts. There are certain questions that I have in mind.
If I talk about contract deployment and storage of the contract, i want to know where is the contract stored in ethereum or hyperledger?

Also, once deployed, how other participants can interact with this contract?

And, is it possible to activate participant level access to the contract on blockchain??
May 3, 2018 in Blockchain by Johnathon
• 9,090 points
9,338 views

5 answers to this question.

+1 vote
Best answer

Ethereum smart contracts are executed on EVM and once the byte code is generated it is then sent within a transaction and then it exists on the blockchain. This happens because once the contract is deployed it then interacts with other transactions.

Hyperledger is a different approach, the contract might be on the ledger or it may not be. If you take an example of fabric, it deploys the code in the docker container which can then be interacted with using transactions. The participants can access the contract via credentials given to them.

In ethereum, the code is a bit simplified, and publicly accessible which means that you only need to employ a check to only allow a few to interact with smart contract.

In hyperledger, it would most likely be modeled in a similar manner.

to answer your last question each participant in both systems has credentials and the designer of the smart contract can use this to control access. Also, in Fabric, there are channels that partition the ledger which is used for access control.

Hope this helps!

Get your Blockchain certification today to learn more about this technology.

Thanks.

answered May 3, 2018 by Shashank
• 10,400 points

selected Aug 3, 2018 by Omkar
0 votes
The smart contracts are stored on the Blockchain itself.
answered May 6, 2019 by Komal
0 votes
When you deploy the smart contract, the contract is compiled into byte code and this code is stored on the Blockchain. The smart contract will be available at least in two locations: on the Blockchain and on the deployed machine.
answered May 6, 2019 by Tina
+1 vote
The contract is stored on the ledger on the Blockchain. So, whenever a transaction happens, a function is invoked that calls the smart contract and the processing is done. Smart Contracts are stored on the Blockchain because it is important for the contract to be available to the people making transactions.
answered May 6, 2019 by Esha
0 votes
Ethereum and Hyperledger are 2 different implementations of Blockchain. In Ethereum the contract in stored on the Blockchain and on the Hyperledger it is stored either on the ledger or on the system.
answered May 6, 2019 by Yogi

Related Questions In Blockchain

+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Basically you implement requested logic on by ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
1,544 views
0 votes
1 answer
+15 votes
2 answers

What are the various blockchain smart contracts platforms?

While Ethereum is the most popular platform ...READ MORE

answered Mar 27, 2018 in Blockchain by Johnathon
• 9,090 points
1,202 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,456 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,928 views
0 votes
1 answer
+1 vote
4 answers

How to estimate the cost for deploying smart contract on mainnet?

Since you have already deployed the contract ...READ MORE

answered Apr 10, 2018 in Blockchain by Shashank
• 10,400 points
15,594 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