@@ -621,21 +621,21 @@ Orders compatibility required:
621621
622622** 1. The worker pool’s category and the requester’s category must be equal.**
623623
624- ``` sol
624+ ``` text
625625require(_requestorder.category == _workerpoolorder.category);
626626```
627627
628628** 2. The worker pool’s trust must be greater or equal to the requester’s
629629trust.**
630630
631- ``` sol
631+ ``` text
632632require(_requestorder.trust == _workerpoolorder.trust);
633633```
634634
635635** 3. The app’s, dataset’s and worker pool’s prices must be less or equal to the
636636requester’s appmaxprice, datasetmaxprice and workerpoolmaxprice.**
637637
638- ``` sol
638+ ``` text
639639require(_requestorder.appmaxprice >= _apporder.appprice);
640640require(_requestorder.datasetmaxprice >= _datasetorder.datasetprice);
641641require(_requestorder.workerpoolmaxprice >= _workerpoolorder.workerpoolprice);
@@ -644,82 +644,82 @@ require(_requestorder.workerpoolmaxprice >= _workerpoolorder.workerpoolprice);
644644** 4. The worker pool’s tag must enable all the features required by the app’s
645645tag, the dataset’s tag and the worker pool’s tag.**
646646
647- ``` sol
647+ ``` text
648648require(tag & ~_workerpoolorder.tag == 0x0);
649649require(tag & ~_workerpoolorder.tag == 0x0);
650650```
651651
652652** 5. If TEE tag is required, then application must be TEE compatible.**
653653
654- ``` sol
654+ ``` text
655655require((tag ^ _apporder.tag)[31] & 0x01 == 0x0);
656656```
657657
658658** 6. The app provided by the apporder must match the one required by the
659659requester.**
660660
661- ``` sol
661+ ``` text
662662require(_requestorder.app == _apporder.app);
663663```
664664
665665** 7. The dataset provided by the datasetorder must match the one required by the
666666requester.**
667667
668- ``` sol
668+ ``` text
669669require(_requestorder.dataset == _datasetorder.dataset);
670670```
671671
672672** 8. If the requester specified a worker pool restriction, the worker pool must
673673match this value or be part of the corresponding group.**
674674
675- ``` sol
675+ ``` text
676676require(_checkIdentity(_requestorder.workerpool, _workerpoolorder.workerpool, GROUPMEMBER_PURPOSE));
677677```
678678
679679** 9. The application must fit the dataset’s and the worker pool’s application
680680restrictions (if any).**
681681
682- ``` sol
682+ ``` text
683683require(_checkIdentity(_datasetorder.apprestrict, _apporder.app, GROUPMEMBER_PURPOSE));
684684require(_checkIdentity(_workerpoolorder.apprestrict, _apporder.app, GROUPMEMBER_PURPOSE));
685685```
686686
687687** 10. The dataset must fit the application’s and the worker pool’s restrictions
688688(if any).**
689689
690- ``` sol
690+ ``` text
691691require(_checkIdentity(_apporder.datasetrestrict, _datasetorder.dataset, GROUPMEMBER_PURPOSE));
692692require(_checkIdentity(_workerpoolorder.datasetrestrict, _datasetorder.dataset, GROUPMEMBER_PURPOSE));
693693```
694694
695695** 11. The worker pool must fit the application’s and the dataset’s restrictions
696696(if any).**
697697
698- ``` sol
698+ ``` text
699699require(_checkIdentity(_apporder.workerpoolrestrict, _workerpoolorder.workerpool, GROUPMEMBER_PURPOSE));
700700require(_checkIdentity(_datasetorder.workerpoolrestrict, _workerpoolorder.workerpool, GROUPMEMBER_PURPOSE));
701701```
702702
703703** 12. The requester must fit the application’s, the dataset’s and the worker
704704pool’s restrictions (if any).**
705705
706- ``` sol
706+ ``` text
707707require(_checkIdentity(_apporder.requesterrestrict, _requestorder.requester, GROUPMEMBER_PURPOSE));
708708require(_checkIdentity(_datasetorder.requesterrestrict, _requestorder.requester, GROUPMEMBER_PURPOSE));
709709require(_checkIdentity(_workerpoolorder.requesterrestrict, _requestorder.requester, GROUPMEMBER_PURPOSE));
710710```
711711
712712** 13. All resources must be registered in the corresponding registries.**
713713
714- ``` sol
714+ ``` text
715715require(m_appregistry.isRegistered(_apporder.app));
716716require(m_datasetregistry.isRegistered(_datasetorder.dataset));
717717require(m_workerpoolregistry.isRegistered(_workerpoolorder.workerpool));
718718```
719719
720720** 14. All orders must be signed or presigned.**
721721
722- ``` sol
722+ ``` text
723723require(_checkPresignatureOrSignature(App(_apporder.app).m_owner(), _apporder.hash(), _apporder.sign));
724724require(_checkPresignatureOrSignature(Dataset(_datasetorder.dataset).m_owner(), _datasetorder.hash(), _datasetorder.sign));
725725require(_checkPresignatureOrSignature(Workerpool(_workerpoolorder.workerpool).m_owner(), _workerpoolorder.hash(), _workerpoolorder.sign));
0 commit comments