MultiversX Tracker is Live!

What happens when 2 contradicting smart contracts happen at the same time?

Etherum Reddit

More / Etherum Reddit 209 Views

So Basically from my understanding (correct me if I’m wrong) when a transaction on a contract is made it is sent by the sender node to be propagated throughout all of the other running nodes mempool. Once included in a mined block this block is sent to all of the other nodes. From this this nodes statedb is updated with the blocks new info.

Now what happens if say there was a contract account that all nodes had stored that say stored an Uint with value 6. Now one person sends a transaction to interact with that contract and calls a divide method that divided the value by 2 and another person sent a different transaction on the same contract but called a function that added 2. If both these transactions were sent then included in the same block then sent out how would the nodes update their statedb for the accounts storage would they update it order the transactions in the block so in that case the if the add transaction was second would the value of the Uint is just be 8? I’m confused about this because this would surely just completely override the first transaction because as in the block it was just pass the value to be updated no evm execution will be done.

submitted by /u/Final_Kangaroo_5148
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments