diff --git a/src/commands/common/validate-asset-command.js b/src/commands/common/validate-asset-command.js index ec25cd8c0..fd150f546 100644 --- a/src/commands/common/validate-asset-command.js +++ b/src/commands/common/validate-asset-command.js @@ -30,6 +30,10 @@ class ValidateAssetCommand extends Command { storeType = LOCAL_STORE_TYPES.TRIPLE, } = command.data; + this.logger.debug( + `Validating Asset Command with operation id: ${operationId}, blockchain: ${blockchain}, contract: ${contract}, tokenId: ${tokenId}, store type: ${storeType}`, + ); + await this.operationIdService.updateOperationIdStatus( operationId, blockchain, @@ -61,7 +65,7 @@ class ValidateAssetCommand extends Command { await this.handleError( operationId, blockchain, - `Invalid assertion id for asset ${ual}. Received value from blockchain: ${blockchainAssertionId}, received value from request: ${cachedData.public.assertionId}`, + `Invalid assertion id for asset ${ual} and operation with id ${operationId}. Received value from blockchain: ${blockchainAssertionId}, received value from request: ${cachedData.public.assertionId}`, this.errorType, true, ); diff --git a/src/commands/protocols/common/find-nodes-command.js b/src/commands/protocols/common/find-nodes-command.js index f11691fbd..268542d63 100644 --- a/src/commands/protocols/common/find-nodes-command.js +++ b/src/commands/protocols/common/find-nodes-command.js @@ -60,7 +60,7 @@ class FindNodesCommand extends Command { await this.handleError( operationId, blockchain, - `Unable to find enough nodes for operationId: ${operationId}, keyword: ${keyword}. Minimum number of nodes required: ${minAckResponses}`, + `Unable to find enough nodes for operationId: ${operationId}, keyword: ${keyword}. Minimum number of nodes required: ${minAckResponses}, number of nodes found: ${closestNodes.length}`, this.errorType, true, ); diff --git a/src/commands/protocols/common/protocol-message-command.js b/src/commands/protocols/common/protocol-message-command.js index b0ee5c48b..b0c2852fb 100644 --- a/src/commands/protocols/common/protocol-message-command.js +++ b/src/commands/protocols/common/protocol-message-command.js @@ -30,6 +30,10 @@ class ProtocolMessageCommand extends Command { const keywordUuid = uuidv5(keyword, uuidv5.URL); + this.logger.debug( + `Sending protocol message with operation id: ${operationId}, keyword uuidv5: ${keywordUuid}`, + ); + const response = await this.networkModuleManager.sendMessage( node.protocol, node.id, @@ -52,7 +56,7 @@ class ProtocolMessageCommand extends Command { default: await this.markResponseAsFailed( command, - `Received unknown message type from node during ${command.name}`, + `Received unknown message type from node during ${command.name}. Unknown message type: ${response.header.messageType}`, ); return Command.empty(); } diff --git a/src/commands/protocols/update/receiver/delete-pending-state-command.js b/src/commands/protocols/update/receiver/delete-pending-state-command.js index 4edf754a5..94cf0fdc7 100644 --- a/src/commands/protocols/update/receiver/delete-pending-state-command.js +++ b/src/commands/protocols/update/receiver/delete-pending-state-command.js @@ -20,7 +20,8 @@ class DeletePendingStateCommand extends Command { this.logger.trace( `Started ${command.name} for blockchain: ${blockchain} contract: ${contract}, ` + - `token id: ${tokenId}, assertion id: ${assertionId}`, + `token id: ${tokenId}, assertion id: ${assertionId}, operation id: ${operationId}` + + `keyword: ${keyword}, hash function id: ${hashFunctionId}`, ); const pendingStateExists = await this.pendingStateExists( @@ -73,6 +74,9 @@ class DeletePendingStateCommand extends Command { } await this.deletePendingState(blockchain, contract, tokenId, assertionId, operationId); } + this.logger.trace( + `No pending state found for operation id: ${operationId} and assertion id`, + ); return Command.empty(); } @@ -111,6 +115,7 @@ class DeletePendingStateCommand extends Command { return true; } } + this.logger.debug(`No pending state exists for assertion id: ${assertionId}`); return false; } diff --git a/src/controllers/http-api/v0/publish-http-api-controller-v0.js b/src/controllers/http-api/v0/publish-http-api-controller-v0.js index f3de5c7c4..dc555cf50 100644 --- a/src/controllers/http-api/v0/publish-http-api-controller-v0.js +++ b/src/controllers/http-api/v0/publish-http-api-controller-v0.js @@ -24,7 +24,7 @@ class PublishController extends BaseController { const hashFunctionId = req.body.hashFunctionId ?? CONTENT_ASSET_HASH_FUNCTION_ID; this.logger.info( - `Received asset with assertion id: ${assertionId}, blockchain: ${blockchain}, hub contract: ${contract}, token id: ${tokenId}`, + `[PUBLISH] Received asset with assertion id: ${assertionId}, blockchain: ${blockchain}, hub contract: ${contract}, token id: ${tokenId}. Hash function id: ${hashFunctionId}`, ); const operationId = await this.operationIdService.generateOperationId( diff --git a/src/service/operation-id-service.js b/src/service/operation-id-service.js index 8331c067e..99d8dc754 100644 --- a/src/service/operation-id-service.js +++ b/src/service/operation-id-service.js @@ -102,7 +102,7 @@ class OperationIdService { } async cacheOperationIdData(operationId, data) { - this.logger.debug(`Caching data for operation id: ${operationId} in file`); + this.logger.trace(`Caching data for operation id: ${operationId} in file.`); const operationIdCachePath = this.fileService.getOperationIdCachePath(); await this.fileService.writeContentsToFile( diff --git a/src/service/ual-service.js b/src/service/ual-service.js index f3f2b3526..895d48817 100644 --- a/src/service/ual-service.js +++ b/src/service/ual-service.js @@ -94,6 +94,11 @@ class UALService { tokenId, 0, )); + + this.logger.debug( + `Calculating location keyword for blockchain: ${blockchain}, contract ${contract}, assertion id: ${assertionId}`, + ); + return this.blockchainModuleManager.encodePacked( blockchain, ['address', 'bytes32'],