Open s1na opened 5 years ago
More generally, a model of concurrency may allow race conditions or deadlocks which could break consensus. For example, Primea uses an event-loop async model of concurrency with additional restrictions involving ownership of resources based on who requested them at a lower gas use. Eth2 async cross-shard calls are still be open to design.
I could mention other efforts which advertise concurrency, but you asked specifically about async models of concurrency.
One thought is that you can build synchronicity on top of asynchronicity (e.g., await/async pattern), but not the other way around, so it may be nice to have some async at the base layer for maximum optionality.
Sorry to be raising an old question again: I was wondering what are the biggest challenges in having an async-by-default interface? reading here it says:
The main argument seems to center around the sync model resembling eth1 more closely. Considering that eth2 (as it currently seems like) would require asynchronous primitives anyway (e.g. for cross-shard communication, or yanking, even same-shard async calls as mentioned by Casey) , what would be the downsides of making some other methods, e.g. CALLs (except library or pure functions), CREATEs and the methods accessing the state, also async?
Of course, one could alternatively ask what would be the benefits of making them async, to which I have no good answer, but would be interested to investigate.