-
Notifications
You must be signed in to change notification settings - Fork 80
Problem: no runner for EDP-based tx-validation (fixes #1950) #1968
Conversation
bors try |
tryBuild failed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if using std::sync::*
primitives in multithreaded async
ecosystem is safe (this may lead to deadlocks). But, it may be safe if the lock does not cross an await point (if it does, then that may be an issue).
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors retry |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
Codecov Report
@@ Coverage Diff @@
## master #1968 +/- ##
==========================================
- Coverage 65.79% 65.26% -0.53%
==========================================
Files 203 206 +3
Lines 25638 25859 +221
==========================================
+ Hits 16868 16877 +9
- Misses 8770 8982 +212
|
tryBuild failed: |
bors retry |
tryBuild failed: |
bors try |
68ef1a4
to
77c2644
Compare
@devashishdxt I simplified the locking there -- there's only one thread pushing the request at a time and waiting for a reply via a mpsc channel ( |
tryBuild succeeded: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
77c2644
to
a3bcfb7
Compare
bors r+ |
Merge conflict. |
Solution: - added a basic req-rep runner writing one cursor-vector + sending back reply in a channel -- it's using std::sync::* primitives, because EnclaveProxy is synchronous + for some, it doesn't matter or may even be preferred (e.g. tokio Mutex isn't preferred if locks are short-lived and don't cross multiple await points) - temporary zmq server to faciliate tx-query -- because of the threading, EnclaveProxy also needed to accept lifetime of 'static - one extra variant in the enclave protocol (mainly used for testing) - old code temporarily hidden under "legacy" flag - since EDP runner only compiles on nightly, there's a fix/hack on Travis to exclude EDP
a3bcfb7
to
7fc6ada
Compare
bors r+ |
Build succeeded: |
Solution:
-- it's using std::sync::* primitives,
because EnclaveProxy is synchronous +
for some, it doesn't matter or may even be preferred
(e.g. tokio Mutex isn't preferred if locks are short-lived
and don't cross multiple await points)
-- because of the treading, EnclaveProxy also needed to
accept lifetime of 'static
there's a fix/hack on Travis to exclude EDP