diff --git a/package-lock.json b/package-lock.json index 94d1a8492..0a368781b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ocean-node", - "version": "2.0.2", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ocean-node", - "version": "2.0.2", + "version": "2.1.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 7379d23c2..154626c06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ocean-node", - "version": "2.0.2", + "version": "2.1.0", "description": "Ocean Node is used to run all core services in the Ocean stack", "author": "Ocean Protocol Foundation", "license": "Apache-2.0", diff --git a/src/components/Indexer/processors/MetadataEventProcessor.ts b/src/components/Indexer/processors/MetadataEventProcessor.ts index 38ef9c334..c8a690c1d 100644 --- a/src/components/Indexer/processors/MetadataEventProcessor.ts +++ b/src/components/Indexer/processors/MetadataEventProcessor.ts @@ -158,8 +158,14 @@ export class MetadataEventProcessor extends BaseEventProcessor { ) return } - // for unencrypted DDOs - if ((parseInt(flag) & 2) === 0 && !this.checkDdoHash(updatedDdo, metadataHash)) { + // For remote DDOs, the on-chain hash covers the remote pointer payload, + // not the fetched document body, so only inline unencrypted DDOs can be + // revalidated here against metadataHash. + if ( + !isRemoteDDO(decryptedDDO) && + (parseInt(flag) & 2) === 0 && + !this.checkDdoHash(updatedDdo, metadataHash) + ) { INDEXER_LOGGER.error('Unencrypted DDO hash does not match metadata hash.') await ddoState.update( this.networkId,