Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [concurrency]

The tag has no usage guidance.

1
vote
2answers
54 views

Is there any kind of locking protocol in Ethereum?

Is there any kind of locking protocol in ethereum, like can two transaction update the state variable same time ?, If yes then how would you avoid that ? Smart Contract XYZ is deployed and two people ...
0
votes
1answer
105 views

how blockchain can handle the concurrency?

I read some pages here about concurrency but I didn't give my answer, actually I am new to Bchain, consider this scenario: There is a game contract on the blockchain for 4 Players, so far three ...
0
votes
0answers
24 views

I am confused with the outcome below

Two contracts (code are for illustrative purposes only. Assume all syntax are correct): contract CA { function FA() public { // Invoke CB.FB() multiple times } } And contract CB ...
0
votes
2answers
39 views

Contract A has a function that depends on Contract B's state. How does concurrency work for these two contracts?

I was thinking about a scenario where one contract depends on another contract's state. For example, contract a may want to decide on its next state update based on the current state of contract b by ...
0
votes
1answer
23 views

Why doesnt Ethereum support concurrency?

Why doesnt Ethereum support concurrency? https://en.m.wikipedia.org/wiki/Concurrency_(computer_science)
0
votes
1answer
54 views

How to immediately close ethclient.Client RPC sockets so they don't linger in TIME_WAIT status on server?

My server is running out of available sockets while I am using goroutines (limited to 100 concurrently) because once a goroutine finishes the ethclient.Client socket stays open in TIME_WAIT status for ...
1
vote
1answer
95 views

Is there concurrency in smartcontracts?

I have a question about concurrency in smart contracts. For instance, I have array of structs and each struct should have a "unqiue" ID. For my needs, it is enough to have ID equal to position in ...
0
votes
0answers
64 views

Concurrent transaction calls on Ethereum smart contracts [duplicate]

Let's say that 2 threads execute transactions of a smart contract and they change the state of the blockchain. What happens if 2 transaction calls over the same method occur at the same time? How ...
21
votes
3answers
2k views

Concurrency patterns for account nonce

The account nonce is the only element in the transaction structure that prevents replay attack (as explained in this very good answer). It essentially forces sequentialisation of an account's ...