Hyperledger Avalon enables privacy in blockchain transactions, moving intensive processing from a main blockchain to improve scalability and latency, and to support attested Oracles
Workload seems to keep the status of the logic between WorkOrders because the Clone method that you are using at "/common/sgx_workload/workload/workload_processor.cpp" does not clone an empty template of the Workload Processor but the last Workload Processor that was used for that type of workload.
I thought that your idea was to keep it stateless between workOrders.
I have to check also what happens if you execute two WorkOrders on different workers over the same logic one after the other what would happen but my guess is that the second one will start with the status of the logic at the point where the first one left it because they both call to the same Clone method. If so this would be a weird behavior since if I don't remember wrong each worker was thought as a independent working machine executing workloads as requested.
Correct me if I'm wrong but it seems like you know that the only way of resetting the logic before the new coming WorkOrderSubmit is doing some kind of hack like you do in your heart_disease_evaluation example (/examples/apps/heart_disease_eval/workload/heart_disease_evaluation_plug-in.cpp). In that example before processing the burst of inputs send on a WorkOrderSubmit you execute a WorkOrder of an empty string, which inside of your logic is interpreted as a reset.
// Clear state - to reset totalRisk and countheart_disease_eval_logic->executeWorkOrder("");
Workload seems to keep the status of the logic between WorkOrders because the Clone method that you are using at "/common/sgx_workload/workload/workload_processor.cpp" does not clone an empty template of the Workload Processor but the last Workload Processor that was used for that type of workload. I thought that your idea was to keep it stateless between workOrders. I have to check also what happens if you execute two WorkOrders on different workers over the same logic one after the other what would happen but my guess is that the second one will start with the status of the logic at the point where the first one left it because they both call to the same Clone method. If so this would be a weird behavior since if I don't remember wrong each worker was thought as a independent working machine executing workloads as requested.
Correct me if I'm wrong but it seems like you know that the only way of resetting the logic before the new coming WorkOrderSubmit is doing some kind of hack like you do in your heart_disease_evaluation example (/examples/apps/heart_disease_eval/workload/heart_disease_evaluation_plug-in.cpp). In that example before processing the burst of inputs send on a WorkOrderSubmit you execute a WorkOrder of an empty string, which inside of your logic is interpreted as a reset.
// Clear state - to reset totalRisk and count
heart_disease_eval_logic->executeWorkOrder("");