You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transfers app listen.sh script was more or less copied from the mtcs app during the hackathon. mtcs is expected to run once every few days/weeks, where transfers runs on every block. But we clear the entire queue on one listening event, so it calls to the enclave redundantly with an empty Requests vector
Acceptance Criteria
Get the listen.sh script to only run as necessary. There should be no calls to the enclave when the Requests vector is empty.
The text was updated successfully, but these errors were encountered:
I think the thing to do is to only run it at most once per block. So we should just keep track of the highest block we ran for and then if we get multiple events for a block only run it on the first one.
Keep in mind we want to figure out a way to make this listen script generic for any app (currently things are hard coded which it should ultimately get from the enclave binary, per #61)
Yes we could run it once per block, inside the enclave code, we can store the block number and compare.
We could also just prevent the listen script from calling the enclave at all. This would prevent the listen script from having to call the enclave, wait for a response, parse it, and realize there is nothing to update. Saving the round trip.
However, this makes the listen script less generic, since it depends on reading the requests length, and making a decision to send a msg to the enclave or not.
It seems to me that we should still go with putting it inside the enclave code, to allow the listen script to still be generic, do you agree @ebuchman ?
Summary
The transfers app
listen.sh
script was more or less copied from themtcs
app during the hackathon.mtcs
is expected to run once every few days/weeks, wheretransfers
runs on every block. But we clear the entire queue on one listening event, so it calls to the enclave redundantly with an empty Requests vectorAcceptance Criteria
Get the
listen.sh
script to only run as necessary. There should be no calls to the enclave when the Requests vector is empty.The text was updated successfully, but these errors were encountered: