@@ -76,39 +76,29 @@ export async function validateAlgoForDataset(
7676 const datasetService = services . find (
7777 ( service : any ) => service . id === datasetServiceId
7878 )
79- CORE_LOGGER . logMessage ( `dataService: ${ datasetService } ` )
8079 if ( ! datasetService ) {
8180 throw new Error ( 'Dataset service not found' )
8281 }
8382 const { compute } = datasetService
84- CORE_LOGGER . logMessage ( `compute: ${ JSON . stringify ( compute ) } ` )
8583 if ( datasetService . type !== 'compute' || ! compute ) {
8684 throw new Error ( 'Service not compute' )
8785 }
8886
8987 if ( algoDID ) {
90- CORE_LOGGER . logMessage ( `algoDID: ${ algoDID } ` )
9188 if (
9289 // if not set allow them all
9390 ( ! Array . isArray ( compute . publisherTrustedAlgorithms ) ||
9491 compute . publisherTrustedAlgorithms . length === 0 ) &&
9592 ( ! Array . isArray ( compute . publisherTrustedAlgorithmPublishers ) ||
9693 compute . publisherTrustedAlgorithmPublishers . length === 0 )
9794 ) {
98- CORE_LOGGER . logMessage (
99- `compute.publisherTrustedAlgorithms: ${ compute . publisherTrustedAlgorithms } `
100- )
101- CORE_LOGGER . logMessage (
102- `compute.publisherTrustedAlgorithmPublishers: ${ compute . publisherTrustedAlgorithmPublishers } `
103- )
10495 return true
10596 }
10697 // if is set only allow if match
10798 if ( compute . publisherTrustedAlgorithms ) {
10899 const trustedAlgo = compute . publisherTrustedAlgorithms . find (
109100 ( algo : any ) => algo . did === algoDID
110101 )
111- CORE_LOGGER . logMessage ( `trustedAlgo: ${ trustedAlgo } ` )
112102 if ( trustedAlgo ) {
113103 return (
114104 trustedAlgo . filesChecksum === algoChecksums . files &&
0 commit comments