Skip to content

Commit

Permalink
Merge pull request #3606 from OriginTrail/v8/release/devnet
Browse files Browse the repository at this point in the history
Sigma 17 Testnet Prerealease
  • Loading branch information
Mihajlo-Pavlovic authored Dec 24, 2024
2 parents 39be866 + e6e16d7 commit 2ccea10
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
12 changes: 6 additions & 6 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
"enabled": false,
"package": "./blockchain/implementation/ot-parachain/ot-parachain-service.js",
"config": {
"hubContractAddress": "0x965C8970784B2c25Ca96F6D284e7E0e3AE6940d1",
"hubContractAddress": "0x94cb4Ce3C6ce3654b0dA47255a2325322DaD5552",
"rpcEndpoints": [
"https://lofar-testnet.origin-trail.network",
"https://lofar-testnet.origintrail.network"
Expand All @@ -500,7 +500,7 @@
"package": "./blockchain/implementation/gnosis/gnosis-service.js",

"config": {
"hubContractAddress": "0xC612946B0d4830F5D9f3DBD1cE0f5770183b07e1",
"hubContractAddress": "0xC2d165484ee044aFCD0F693a84Ae57235FD986fA",
"gasPriceOracleLink": "https://blockscout.chiadochain.net/api/v1/gas-price-oracle",
"rpcEndpoints": ["https://rpc.chiadochain.net"],
"operatorFee": 0
Expand All @@ -511,7 +511,7 @@
"package": "./blockchain/implementation/base/base-service.js",

"config": {
"hubContractAddress": "0x3a38fC53a00C12a9883Cf8B61c8A76a88902f81C",
"hubContractAddress": "0x4A0aC589D7469868ff4EC889aa2c7eE43d30d823",
"rpcEndpoints": ["https://sepolia.base.org"],
"operatorFee": 0
}
Expand Down Expand Up @@ -579,9 +579,9 @@
"gnosis:10200": ["https://rpc.chiadochain.net"]
},
"hubContractAddress": {
"base:84532": "0x3a38fC53a00C12a9883Cf8B61c8A76a88902f81C",
"otp:20430": "0x965C8970784B2c25Ca96F6D284e7E0e3AE6940d1",
"gnosis:10200": "0xC612946B0d4830F5D9f3DBD1cE0f5770183b07e1"
"base:84532": "0x4A0aC589D7469868ff4EC889aa2c7eE43d30d823",
"otp:20430": "0x94cb4Ce3C6ce3654b0dA47255a2325322DaD5552",
"gnosis:10200": "0xC2d165484ee044aFCD0F693a84Ae57235FD986fA"
}
}
}
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.16",
"version": "8.0.0-sigma.17",
"description": "OTNode V8",
"main": "index.js",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { kcTools } from 'assertion-tools';
import ProtocolRequestCommand from '../../../common/protocol-request-command.js';
import {
NETWORK_MESSAGE_TIMEOUT_MILLS,
ERROR_TYPE,
OPERATION_REQUEST_STATUS,
OPERATION_STATUS,
OPERATION_ID_STATUS,
PRIVATE_HASH_SUBJECT_PREFIX,
} from '../../../../../constants/constants.js';

class GetRequestCommand extends ProtocolRequestCommand {
Expand Down Expand Up @@ -69,16 +71,37 @@ class GetRequestCommand extends ProtocolRequestCommand {
const { blockchain, contract, knowledgeCollectionId, knowledgeAssetId } = command.data;
if (responseData?.assertion?.public) {
// Only whole collection can be validated not particular KA

if (!knowledgeAssetId) {
const publicAssertion = responseData?.assertion?.public;

const filteredPublic = [];
const privateHashTriples = [];
publicAssertion.forEach((triple) => {
if (triple.startsWith(`<${PRIVATE_HASH_SUBJECT_PREFIX}`)) {
privateHashTriples.push(triple);
} else {
filteredPublic.push(triple);
}
});

const publicKnowledgeAssetsTriplesGrouped = kcTools.groupNquadsBySubject(
filteredPublic,
true,
);
publicKnowledgeAssetsTriplesGrouped.push(
...kcTools.groupNquadsBySubject(privateHashTriples, true),
);
try {
await this.validationService.validateDatasetOnBlockchain(
responseData.assertion.public,
publicKnowledgeAssetsTriplesGrouped.map((t) => t.sort()).flat(),
blockchain,
contract,
knowledgeCollectionId,
);

// This is added as support when get starts supporting private for curated paranet
// TODO: This needs to be fixed when paranets are introduced
if (responseData.assertion?.private?.length)
await this.validationService.validatePrivateMerkleRoot(
responseData.assertion.public,
Expand Down

0 comments on commit 2ccea10

Please sign in to comment.