Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Race conditions during network tests #85

Closed
DavidVorick opened this issue Nov 29, 2014 · 2 comments
Closed

Race conditions during network tests #85

DavidVorick opened this issue Nov 29, 2014 · 2 comments
Assignees
Labels

Comments

@DavidVorick
Copy link
Member

No description provided.

@DavidVorick
Copy link
Member Author

One thing to look out for (I think this problem is mostly in my code) is mutexes while network stuff is happening. For example, the state was locked while a call to peer.RPC was happening, which was really slowing down the state.

This could be a significant DOS vector.

First and foremost we want to have no race conditions. But especially when the time comes to review the whole codebase, we should look for places where the network is being used and make sure that there are no mutexes locked while we go through the network.

@lukechampine
Copy link
Member

Right now we don't support RPC errors (except for timeouts), so we could actually make RPCs asynchronous by default. Would make some other things more flexible too, since RPC functions would no longer need to return an error; they could return anything or nothing (i.e. they could be a pre-existing function, doubling as an RPC).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants