Skip to content

Commit

Permalink
Merge pull request #3420 from OriginTrail/fix/sync-fixes
Browse files Browse the repository at this point in the history
Fix/sync fixes
  • Loading branch information
Mihajlo-Pavlovic authored Nov 20, 2024
2 parents 4ccdd1f + 974402a commit 649b294
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
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.1.3+beta.2",
"version": "8.1.3+beta.4",
"description": "OTNode V8",
"main": "index.js",
"type": "module",
Expand Down
13 changes: 8 additions & 5 deletions src/commands/paranet/paranet-sync-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ class ParanetSyncCommand extends Command {
state: assertionId,
hashFunctionId: CONTENT_ASSET_HASH_FUNCTION_ID,
assertionId,
paranetId,
paranetUAL,
},
transactional: false,
});
Expand All @@ -234,6 +236,8 @@ class ParanetSyncCommand extends Command {
state: assertionId,
hashFunctionId: CONTENT_ASSET_HASH_FUNCTION_ID,
assertionId,
paranetId,
paranetUAL,
},
transactional: false,
});
Expand Down Expand Up @@ -274,9 +278,8 @@ class ParanetSyncCommand extends Command {
}

const data = await this.operationIdService.getCachedOperationIdData(getOperationId);

this.logger.debug(
`Paranet sync: ${data.nquads.length} nquads found for asset with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
`Paranet sync: ${data.assertion.length} nquads found for asset with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
);

let repository;
Expand All @@ -293,19 +296,19 @@ class ParanetSyncCommand extends Command {
await this.tripleStoreService.localStoreAsset(
repository,
assertionId,
data.nquads,
data.assertion,
blockchain,
contract,
tokenId,
keyword,
LOCAL_INSERT_FOR_CURATED_PARANET_MAX_ATTEMPTS,
LOCAL_INSERT_FOR_CURATED_PARANET_RETRY_DELAY,
);
if (paranetNodesAccessPolicy === 'CURATED' && data.privateNquads) {
if (paranetNodesAccessPolicy === 'CURATED' && data.privateAssertion) {
await this.tripleStoreService.localStoreAsset(
repository,
data.syncedAssetRecord.privateAssertionId,
data.privateNquads,
data.privateAssertion,
blockchain,
contract,
tokenId,
Expand Down
2 changes: 1 addition & 1 deletion src/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const SIMPLE_ASSET_SYNC_PARAMETERS = {

export const PARANET_SYNC_PARAMETERS = {
GET_RESULT_POLLING_INTERVAL_MILLIS: 1 * 1000,
GET_RESULT_POLLING_MAX_ATTEMPTS: 30,
GET_RESULT_POLLING_MAX_ATTEMPTS: 300,
};

export const COMMAND_TX_GAS_INCREASE_FACTORS = {
Expand Down
2 changes: 1 addition & 1 deletion src/service/get-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class GetService extends OperationService {
await this.markOperationAsCompleted(
operationId,
blockchain,
{ assertion: responseData.nquads },
{ assertion: responseData.nquads, privateAssertion: responseData.privateNquads },
[...this.completedStatuses],
);
this.logResponsesSummary(completedNumber, failedNumber);
Expand Down

0 comments on commit 649b294

Please sign in to comment.