How can I synchronize smart contract on blockchain?

0 votes
Imagine a smart contract getting triggered by a transaction and as a result it sends another txn. How is this code executed? If each node will execute code there is going to be lot same transactions with only possible difference between the timestamp. How can this be avoided??
May 29, 2018 in Blockchain by Johnathon
• 9,090 points
36 views

1 answer to this question.

0 votes

This is how it is on Blockchain.

The nodes are competing to be the first to commit the block of transactions to the existing chain. Then all other nodes receive that block and store it with the rest of their chain data.

So, even if there are temporary differences between independent nodes they are still only storing the same transaction. And the record of transaction is made of the sum of total of all the data All txns are not committed immediately when you submit them.

They are placed into a list of pending txns, along with their accompanying gas. Those txns that sent along a higher accompanying fee will be selected for inclusion into the block being currently mined.

answered May 29, 2018 by Perry
• 17,090 points

Related Questions In Blockchain

+1 vote
1 answer

How is a smart contract stored on a Blockchain?

Smart contract template and transaction events are ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,810 points
176 views
+1 vote
2 answers

Can I include real world data in a smart contract? If so, how?

You cant access/embed real world data using ...READ MORE

answered Jul 17, 2018 in Blockchain by sapan
81 views
0 votes
1 answer

How can i create a simple P2P network on a blockchain?

To develop your own cryptocurrency, you need ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,810 points
252 views
0 votes
2 answers

How do I interact with a smart contract on a private network through web3.js

I found a blog that explains how ...READ MORE

answered Aug 20, 2018 in Blockchain by slayer
• 29,240 points
439 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,810 points
188 views
0 votes
1 answer
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
182 views
0 votes
1 answer

How can I deploy a HelloWorld contract on my testrpc network?

The problem lies in the command: truffle migrate Your truffle migrate command ...READ MORE

answered Apr 27, 2018 in Blockchain by Perry
• 17,090 points

edited Aug 10, 2018 by Omkar 544 views
0 votes
1 answer

How do I withdraw the balance from a contract on Ethereum test blockchain?

Your need to improvise your code a ...READ MORE

answered Aug 3, 2018 in Blockchain by Perry
• 17,090 points
98 views