diff --git a/config/config.json b/config/config.json index b9a156aa5..8d0e9f689 100644 --- a/config/config.json +++ b/config/config.json @@ -158,7 +158,7 @@ "localEndpoint": "http::addr=localhost:10000", "signalingServiceEndpoint": "", "sendToSignalingService": false - } + } } } }, @@ -347,7 +347,7 @@ "localEndpoint": "http::addr=localhost:10000", "signalingServiceEndpoint": "", "sendToSignalingService": false - } + } } } }, @@ -536,7 +536,7 @@ "localEndpoint": "http::addr=localhost:10000", "signalingServiceEndpoint": "", "sendToSignalingService": false - } + } } } }, @@ -675,7 +675,7 @@ "package": "./blockchain/implementation/base/base-service.js", "config": { - "hubContractAddress": "0xAB4A4794Fc1F415C24807B947280aCa8dC492238", + "hubContractAddress": "0x3e5dd82e7529F4e55AA64893D8f8879AE14BF87D", "rpcEndpoints": ["https://sepolia.base.org"], "operatorFee": 0 } @@ -722,7 +722,7 @@ "localEndpoint": "http::addr=localhost:10000", "signalingServiceEndpoint": "", "sendToSignalingService": false - } + } } } }, @@ -738,7 +738,7 @@ "base:84532": ["https://sepolia.base.org"] }, "hubContractAddress": { - "base:84532": "0xAB4A4794Fc1F415C24807B947280aCa8dC492238" + "base:84532": "0x3e5dd82e7529F4e55AA64893D8f8879AE14BF87D" } } } @@ -931,8 +931,7 @@ "localEndpoint": "http::addr=localhost:10000", "signalingServiceEndpoint": "", "sendToSignalingService": false - - } + } } } }, diff --git a/package-lock.json b/package-lock.json index d697ba129..fbd691a67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "origintrail_node", - "version": "8.0.0-sigma.0", + "version": "8.0.0-gamma.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "origintrail_node", - "version": "8.0.0-sigma.0", + "version": "8.0.0-gamma.3", "license": "ISC", "dependencies": { "@comunica/query-sparql": "^2.4.3", diff --git a/package.json b/package.json index a343a5859..be0a95d25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "8.0.0-sigma.0", + "version": "8.0.0-gamma.3", "description": "OTNode V8", "main": "index.js", "type": "module", diff --git a/src/commands/blockchain-event-listener/blockchain-event-listener-command.js b/src/commands/blockchain-event-listener/blockchain-event-listener-command.js index c1fcee889..bbb8670d4 100644 --- a/src/commands/blockchain-event-listener/blockchain-event-listener-command.js +++ b/src/commands/blockchain-event-listener/blockchain-event-listener-command.js @@ -76,14 +76,15 @@ class BlockchainEventListenerCommand extends Command { await this.repositoryModuleManager.insertBlockchainEvents(newEvents, { transaction: repositoryTransaction, }); - await this.repositoryModuleManager.updateLastCheckedBlock( - blockchainId, - this.currentBlock, - Date.now(), - { transaction: repositoryTransaction }, - ); } + await this.repositoryModuleManager.updateLastCheckedBlock( + blockchainId, + this.currentBlock, + Date.now(), + { transaction: repositoryTransaction }, + ); + const unprocessedEvents = await this.repositoryModuleManager.getAllUnprocessedBlockchainEvents( blockchainId, @@ -470,10 +471,8 @@ class BlockchainEventListenerCommand extends Command { async handleKnowledgeCollectionCreatedEvent(event) { const eventData = JSON.parse(event.data); - const { id, publishOperationId, merkleRoot, chunksAmount } = eventData; const { blockchain, contractAddress } = event; - const operationId = await this.operationIdService.generateOperationId( OPERATION_ID_STATUS.PUBLISH_FINALIZATION.PUBLISH_FINALIZATION_START, publishOperationId, diff --git a/src/modules/blockchain-events/implementation/ot-ethers/ot-ethers.js b/src/modules/blockchain-events/implementation/ot-ethers/ot-ethers.js index ca40db542..acf9c4f87 100644 --- a/src/modules/blockchain-events/implementation/ot-ethers/ot-ethers.js +++ b/src/modules/blockchain-events/implementation/ot-ethers/ot-ethers.js @@ -122,7 +122,6 @@ class OtEthers extends BlockchainEventsService { let fromBlock = currentBlock - lastCheckedBlock > maxBlocksToSync ? currentBlock : lastCheckedBlock + 1; const eventsMissed = currentBlock - lastCheckedBlock > maxBlocksToSync; - if (eventsMissed) { return { events: [], @@ -168,12 +167,19 @@ class OtEthers extends BlockchainEventsService { fromBlock + MAXIMUM_NUMBERS_OF_BLOCKS_TO_FETCH - 1, currentBlock, ); + + const fromBlockParam = ethers.BigNumber.from(fromBlock) + .toHexString() + .replace(/^0x0+/, '0x'); + const toBlockParam = ethers.BigNumber.from(toBlock) + .toHexString() + .replace(/^0x0+/, '0x'); const provider = this._getRandomProvider(blockchain); const newLogs = await provider.send('eth_getLogs', [ { address: contractAddresses, - fromBlock: ethers.BigNumber.from(fromBlock).toHexString(), - toBlock: ethers.BigNumber.from(toBlock).toHexString(), + fromBlock: fromBlockParam, + toBlock: toBlockParam, topics: [topics], }, ]); diff --git a/src/modules/telemetry/implementation/quest-telemetry.js b/src/modules/telemetry/implementation/quest-telemetry.js index 13ae80192..13faf4fab 100644 --- a/src/modules/telemetry/implementation/quest-telemetry.js +++ b/src/modules/telemetry/implementation/quest-telemetry.js @@ -38,7 +38,7 @@ class QuestTelemetry { await this.localSender.flush(); await this.localSender.close(); - this.logger.info('Event telemetry successfully sent to local QuestDB'); + // this.logger.info('Event telemetry successfully sent to local QuestDB'); } catch (err) { this.logger.error(`Error sending telemetry to local QuestDB: ${err.message}`); } diff --git a/src/service/validation-service.js b/src/service/validation-service.js index e844987f9..743d49c4b 100644 --- a/src/service/validation-service.js +++ b/src/service/validation-service.js @@ -39,7 +39,7 @@ class ValidationService { } async validateDatasetRootOnBlockchain(knowledgeCollectionId, assertionId, blockchain) { - // call contract TO DO, dont return anything or return true + // TODO: call contract TO DO, dont return anything or return true return { knowledgeCollectionId, assertionId, blockchain }; }