Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OriginTrail Testnet Release 6.0.13 #2684

Merged
merged 52 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
cfbf5ef
Changed triggers fro Github Actions to trigger on PR to default branc…
u-hubar Jun 21, 2023
e415dde
update libp2p to latest version (#2493)
zeroxbt Jul 13, 2023
a8465d0
Merge pull request #2645 from OriginTrail/v6/develop
zeroxbt Jul 13, 2023
60c7ab9
Merge pull request #2646 from OriginTrail/v6/prerelease/devnet
zeroxbt Jul 13, 2023
a90070e
add announce address (#2648)
zeroxbt Jul 13, 2023
197701a
bump version (#2649)
zeroxbt Jul 13, 2023
3ba3538
Merge pull request #2650 from OriginTrail/v6/develop
zeroxbt Jul 13, 2023
46420a1
Merge pull request #2651 from OriginTrail/v6/prerelease/devnet
zeroxbt Jul 13, 2023
661a53d
Revert "bump version (#2649)"
zeroxbt Jul 14, 2023
a4aecd1
Revert "add announce address (#2648)"
zeroxbt Jul 14, 2023
ac22e9d
Revert "update libp2p to latest version (#2493)"
zeroxbt Jul 14, 2023
a265983
Merge pull request #2652 from OriginTrail/v6/develop
zeroxbt Jul 14, 2023
aba56a3
Merge pull request #2653 from OriginTrail/v6/prerelease/devnet
zeroxbt Jul 14, 2023
ba070ee
Fix BDD tests (#2647)
djordjekovac Jul 14, 2023
01dd59c
only start libp2p after router init
zeroxbt Jul 17, 2023
82fa8e8
fix update peer last seen and dialed
zeroxbt Jul 17, 2023
28a7ab9
Bump word-wrap from 1.2.3 to 1.2.4 (#2657)
dependabot[bot] Jul 19, 2023
8a61165
Merge branch 'v6/bug-fix/delay-start-libp2p' into v6/develop
zeroxbt Jul 20, 2023
4235e03
Merge branch 'v6/bug-fix/update-last-seen-and-dialed' into v6/develop
zeroxbt Jul 20, 2023
43ae92a
Add check for assertion size limit (#2661)
djordjekovac Aug 11, 2023
fb87b50
Added check for bids for the neighbourhood during publish start (#2662)
djordjekovac Aug 14, 2023
b72ea67
fix handling of failed transactions (#2634)
zeroxbt Aug 14, 2023
b9a694b
Merge branch 'v6/develop' of https://github.com/OriginTrail/ot-node i…
zeroxbt Aug 14, 2023
2c06c9e
only start libp2p after router init (#2654)
zeroxbt Aug 14, 2023
3f2c863
fix update peer last seen and dialed (#2655)
zeroxbt Aug 14, 2023
5f31689
Merge branch 'v6/develop' of https://github.com/OriginTrail/ot-node i…
zeroxbt Aug 14, 2023
8bddc8c
fix network port log (#2666)
zeroxbt Aug 17, 2023
1f1221d
Added updates for bid suggestion and assertion size handling (#2668)
djordjekovac Aug 17, 2023
ee06b74
version bump (#2669)
djordjekovac Aug 17, 2023
cbb81b3
Merge branch 'v6/prerelease/devnet' into v6/develop
djordjekovac Aug 17, 2023
7a07df1
Merge pull request #2671 from OriginTrail/v6/develop
zeroxbt Aug 17, 2023
913772d
Merge pull request #2672 from OriginTrail/v6/prerelease/devnet
zeroxbt Aug 17, 2023
a6b7321
Merge branch 'v6/develop' of https://github.com/OriginTrail/ot-node i…
zeroxbt Aug 17, 2023
73d9c5b
Added missing assertionId in the pending-storage-service and get prot…
u-hubar Aug 21, 2023
354da76
Removed pending storage folders deletion
u-hubar Aug 21, 2023
80fc851
Reverted pending storage folders removal, updated deletePendingStateC…
u-hubar Aug 22, 2023
4c9fa49
Merge pull request #2609 from OriginTrail/improvement/github-actions-…
u-hubar Aug 22, 2023
3d3cc67
Bumped version to 6.0.13+hotfix.1
u-hubar Aug 22, 2023
e33ef02
Merge branch 'v6/prerelease/devnet' into bugfix/get-and-finalization
u-hubar Aug 22, 2023
3d57e61
Fixed github checks triggers
u-hubar Aug 22, 2023
a5deb64
Changed github action checks trigger to all PRs
u-hubar Aug 22, 2023
a2bed5a
Merge pull request #2675 from OriginTrail/bugfix/get-and-finalization
u-hubar Aug 22, 2023
71d2349
Added missing await and folder existance check while removing pending…
u-hubar Aug 22, 2023
791acc7
Merge pull request #2678 from OriginTrail/bugfix/get-and-finalization-2
NZT48 Aug 22, 2023
9b1d432
Added missing await, added checks before trying to delete pending sto…
u-hubar Aug 22, 2023
034e49b
Update test/bdd/steps/lib/local-blockchain.mjs
NZT48 Aug 22, 2023
a128d67
Merge pull request #2679 from OriginTrail/bugfix/get-and-finalization-3
NZT48 Aug 22, 2023
1a02011
Merge pull request #2680 from OriginTrail/v6/prerelease/devnet
NZT48 Aug 22, 2023
77cecbd
Removed hotfix suffix from the version
u-hubar Aug 23, 2023
0374b73
Merge pull request #2681 from OriginTrail/hotfix-suffix-removal
u-hubar Aug 23, 2023
ddf7e37
Merge pull request #2682 from OriginTrail/v6/prerelease/devnet
u-hubar Aug 23, 2023
3bf293f
Merge pull request #2683 from OriginTrail/v6/development-network
djordjekovac Aug 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: checks

on:
pull_request:
branches:
- v6/develop
types: [opened, reopened, synchronize]

env:
REPOSITORY_PASSWORD: password
Expand Down
4 changes: 4 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
}
}
},
"maximumAssertionSizeInKb": 2500,
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "info",
Expand Down Expand Up @@ -302,6 +303,7 @@
}
}
},
"maximumAssertionSizeInKb": 2500,
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
Expand Down Expand Up @@ -449,6 +451,7 @@
}
}
},
"maximumAssertionSizeInKb": 2500,
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
Expand Down Expand Up @@ -597,6 +600,7 @@
}
}
},
"maximumAssertionSizeInKb": 2500,
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
Expand Down
6 changes: 6 additions & 0 deletions ot-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class OTNode {

await this.initializeCommandExecutor();
await this.initializeRouters();
await this.startNetworkModule();
this.logger.info('Node is up and running!');
}

Expand Down Expand Up @@ -254,6 +255,11 @@ class OTNode {
}
}

async startNetworkModule() {
const networkModuleManager = this.container.resolve('networkModuleManager');
await networkModuleManager.start();
}

async executePrivateAssetsMetadataMigration() {
if (
process.env.NODE_ENV === NODE_ENVIRONMENTS.DEVELOPMENT ||
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "6.0.12",
"version": "6.0.13",
"description": "OTNode V6",
"main": "index.js",
"type": "module",
Expand All @@ -12,6 +12,7 @@
"lint-staged": "lint-staged",
"create-account-mapping-signature": "node tools/ot-parachain-account-mapping/create-account-mapping-signature.js ",
"start:local_blockchain": "npm explore dkg-evm-module -- npm run dev",
"kill:local_blockchain": "npx kill-port 8545",
"test:bdd": "cucumber-js --fail-fast --format progress --format-options '{\"colorsEnabled\": true}' test/bdd/ --import test/bdd/steps/ --exit",
"test:unit": "nyc --all mocha --exit $(find test/unit -name '*.js')",
"test:modules": "nyc --all mocha --exit $(find test/modules -name '*.js')",
Expand Down Expand Up @@ -74,7 +75,7 @@
"axios": "^0.27.2",
"cors": "^2.8.5",
"deep-extend": "^0.6.0",
"dkg-evm-module": "^4.0.5",
"dkg-evm-module": "^4.0.7",
"dotenv": "^16.0.1",
"ethers": "^5.7.2",
"express": "^4.18.1",
Expand Down
7 changes: 5 additions & 2 deletions src/commands/local-store/local-store-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ class LocalStoreCommand extends Command {
await this.commandExecutor.add({
name: 'deletePendingStateCommand',
sequence: [],
delay: updateCommitWindowDuration * 1000,
data: { ...command.data, repository: PENDING_STORAGE_REPOSITORIES.PRIVATE },
delay: (updateCommitWindowDuration + 60) * 1000,
data: {
...command.data,
assertionId: cachedData.public.assertionId,
},
transactional: false,
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Command from '../../command.js';
import { NETWORK_MESSAGE_TYPES } from '../../../constants/constants.js';
import { BYTES_IN_KILOBYTE, NETWORK_MESSAGE_TYPES } from '../../../constants/constants.js';

class HandleProtocolMessageCommand extends Command {
constructor(ctx) {
Expand Down Expand Up @@ -127,6 +127,18 @@ class HandleProtocolMessageCommand extends Command {
this.blockchainModuleManager.getR0(blockchain),
getAsk(),
]);
const blockchainAssertionSizeInKb = blockchainAssertionSize / BYTES_IN_KILOBYTE;
if (blockchainAssertionSizeInKb > this.config.maximumAssertionSizeInKb) {
this.logger.warn(
`The size of the received assertion exceeds the maximum limit allowed.. Maximum allowed assertion size in kb: ${this.config.maximumAssertionSizeInKb}, assertion size read from blockchain in kb: ${blockchainAssertionSizeInKb}`,
);
return {
errorMessage:
'The size of the received assertion exceeds the maximum limit allowed.',
agreementId,
agreementData,
};
}

const now = await this.blockchainModuleManager.getBlockchainTimestamp(blockchain);

Expand All @@ -143,8 +155,7 @@ class HandleProtocolMessageCommand extends Command {
.mul(epochsLeft)
.mul(blockchainAssertionSize);

const serviceAgreementBid = this.blockchainModuleManager
.toBigNumber(blockchain, agreementData.tokenAmount)
const serviceAgreementBid = agreementData.tokenAmount
.add(agreementData.updateTokenAmount)
.mul(1024)
.div(divisor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,24 @@ class HandleGetInitCommand extends HandleProtocolMessageCommand {
blockchain,
contract,
tokenId,
assertionId,
);
}

for (const repository of [
TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT,
TRIPLE_STORE_REPOSITORIES.PUBLIC_HISTORY,
]) {
if (assertionExists) {
break;
if (!assertionExists) {
for (const repository of [
TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT,
TRIPLE_STORE_REPOSITORIES.PUBLIC_HISTORY,
]) {
// eslint-disable-next-line no-await-in-loop
assertionExists = await this.tripleStoreService.assertionExists(
repository,
assertionId,
);
if (assertionExists) {
break;
}
}

// eslint-disable-next-line no-await-in-loop
assertionExists = await this.tripleStoreService.assertionExists(
repository,
assertionId,
);
}

await this.operationIdService.updateOperationIdStatus(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class HandleGetRequestCommand extends HandleProtocolMessageCommand {
OPERATION_ID_STATUS.GET.GET_REMOTE_START,
);

let nquads;
if (
state !== GET_STATES.FINALIZED &&
blockchain != null &&
Expand All @@ -37,26 +38,24 @@ class HandleGetRequestCommand extends HandleProtocolMessageCommand {
blockchain,
contract,
tokenId,
assertionId,
operationId,
);
if (cachedAssertion?.public?.assertion?.length) {
return {
messageType: NETWORK_MESSAGE_TYPES.RESPONSES.ACK,
messageData: { nquads: cachedAssertion.public.assertion },
};
nquads = cachedAssertion.public.assertion;
}
}

let nquads;
for (const repository of [
TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT,
TRIPLE_STORE_REPOSITORIES.PUBLIC_HISTORY,
]) {
// eslint-disable-next-line no-await-in-loop
nquads = await this.tripleStoreService.getAssertion(repository, assertionId);

if (nquads.length) {
break;
if (!nquads?.length) {
for (const repository of [
TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT,
TRIPLE_STORE_REPOSITORIES.PUBLIC_HISTORY,
]) {
// eslint-disable-next-line no-await-in-loop
nquads = await this.tripleStoreService.getAssertion(repository, assertionId);
if (nquads.length) {
break;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ class GetAssertionIdCommand extends Command {
}
}

return this.continueSequence(
{ ...command.data, state: assertionId, assertionId },
command.sequence,
);
return this.continueSequence({ ...command.data, state, assertionId }, command.sequence);
}

async handleError(operationId, errorMessage, errorType) {
Expand Down
Loading