Skip to content

Commit

Permalink
Merge branch 'v8/develop' into release/v8.0.0-sigma
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihajlo-Pavlovic committed Dec 16, 2024
2 parents 64664ab + 906d619 commit 31c5d01
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
15 changes: 7 additions & 8 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"localEndpoint": "http::addr=localhost:10000",
"signalingServiceEndpoint": "",
"sendToSignalingService": false
}
}
}
}
},
Expand Down Expand Up @@ -347,7 +347,7 @@
"localEndpoint": "http::addr=localhost:10000",
"signalingServiceEndpoint": "",
"sendToSignalingService": false
}
}
}
}
},
Expand Down Expand Up @@ -536,7 +536,7 @@
"localEndpoint": "http::addr=localhost:10000",
"signalingServiceEndpoint": "",
"sendToSignalingService": false
}
}
}
}
},
Expand Down Expand Up @@ -675,7 +675,7 @@
"package": "./blockchain/implementation/base/base-service.js",

"config": {
"hubContractAddress": "0xAB4A4794Fc1F415C24807B947280aCa8dC492238",
"hubContractAddress": "0x3e5dd82e7529F4e55AA64893D8f8879AE14BF87D",
"rpcEndpoints": ["https://sepolia.base.org"],
"operatorFee": 0
}
Expand Down Expand Up @@ -722,7 +722,7 @@
"localEndpoint": "http::addr=localhost:10000",
"signalingServiceEndpoint": "",
"sendToSignalingService": false
}
}
}
}
},
Expand All @@ -738,7 +738,7 @@
"base:84532": ["https://sepolia.base.org"]
},
"hubContractAddress": {
"base:84532": "0xAB4A4794Fc1F415C24807B947280aCa8dC492238"
"base:84532": "0x3e5dd82e7529F4e55AA64893D8f8879AE14BF87D"
}
}
}
Expand Down Expand Up @@ -931,8 +931,7 @@
"localEndpoint": "http::addr=localhost:10000",
"signalingServiceEndpoint": "",
"sendToSignalingService": false

}
}
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down Expand Up @@ -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],
},
]);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/telemetry/implementation/quest-telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/service/validation-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand Down

0 comments on commit 31c5d01

Please sign in to comment.