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 Mainnet prerelease v6.4.0 #3213

Merged
merged 147 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
2e664d1
Run hardhat1 as v2 in linux start up script
aleksamagicka Apr 25, 2024
43e3649
Added sync commands for paranets
djordjekovac Apr 16, 2024
23fb4d8
Refactor syncAsset a bit
aleksamagicka Apr 17, 2024
3465d91
Add more comments, fix missing constants
aleksamagicka Apr 17, 2024
6061f51
Retrieve some vars from the command itself
aleksamagicka Apr 17, 2024
38cee8c
Add additional params for get-service for parachain insertion
aleksamagicka Apr 18, 2024
6f8f280
Fix parameter name
aleksamagicka Apr 18, 2024
f3629de
Add more comments
aleksamagicka Apr 22, 2024
f35a930
Move asset if needed
aleksamagicka Apr 22, 2024
8caca6d
Add more todos
aleksamagicka Apr 22, 2024
12e9afa
Check if UAL is valid before starting
aleksamagicka Apr 24, 2024
335e4d3
Get blockchain and contract from ualService
aleksamagicka Apr 24, 2024
35b3311
Use paranetIdService to generate paranet repo name
aleksamagicka Apr 24, 2024
49e193d
Move pre-latest asset and store newest in current
aleksamagicka Apr 24, 2024
437c87f
Add mock fetchTokenIdsForParanet() and iterate over the tokens
aleksamagicka Apr 24, 2024
ca8b503
Add log msgs and remove invalidParanets
aleksamagicka Apr 26, 2024
3c4da47
Remove unnecessary comment
aleksamagicka Apr 26, 2024
3c62b9a
Fix log messages
aleksamagicka Apr 26, 2024
098099a
Rename newRepoId to paranetRepository
aleksamagicka Apr 26, 2024
a1ce8b3
paranetAssetExists instead of assetExists
aleksamagicka Apr 26, 2024
29005fc
Add paranets registry contract to constants
aleksamagicka Apr 26, 2024
ecf0937
Add WIP fetchTokenIdsForParanet() implementation
aleksamagicka Apr 26, 2024
c6bfb8f
Add generic contract calls for paranet KAs
aleksamagicka Apr 29, 2024
c3c5696
Remove separate fetchTokenIdsForParanet command
aleksamagicka Apr 29, 2024
deed11d
Add logic for fetching KAs to update
aleksamagicka Apr 29, 2024
4a0b9a6
Add Paranet model, migration and repo
aleksamagicka Apr 29, 2024
ce26a95
Add paranet repo to sequelize-repository and module manager
aleksamagicka Apr 29, 2024
df2ba83
Retrieve kaCount from db in start-paranet-sync
aleksamagicka Apr 29, 2024
838c23f
Check for null
aleksamagicka Apr 29, 2024
e02e5c0
Save kaCount to db and add awaits
aleksamagicka Apr 29, 2024
73b60c3
Use findOrCreate for getParanet to cover first call
aleksamagicka Apr 29, 2024
9afc322
Add logs to start-paranet-sync
aleksamagicka Apr 29, 2024
25a8129
Properly call getParanetById
aleksamagicka Apr 29, 2024
d499b8e
Remove unneeded check in start-paranet-sync
aleksamagicka Apr 29, 2024
1de0a6d
Rename function to getOrCreateParanet
aleksamagicka Apr 29, 2024
dbfda64
Use TRIPLE_STORE_REPOSITORY from constants and reformat file
aleksamagicka Apr 29, 2024
bb4aac6
Move KA number (50) to constants
aleksamagicka Apr 29, 2024
5f4597b
Fix lint issues
aleksamagicka Apr 29, 2024
32cdef1
Make startParanetSync schedule paranetSync commands for each paranet
aleksamagicka Apr 30, 2024
3c90e3b
PARACHAIN -> PARANET in logs
aleksamagicka Apr 30, 2024
3c7bfbd
Add missing param to syncAsset
aleksamagicka Apr 30, 2024
c80d36e
stateIndex >= 0
aleksamagicka Apr 30, 2024
9295b8e
Use DI for ParanetIdService
aleksamagicka Apr 30, 2024
fe88963
Merge pull request #3145 from aleksamagicka/v6/paranet-sync-command-a…
Mihajlo-Pavlovic May 14, 2024
ea0e238
Paranet improvments
Mihajlo-Pavlovic May 16, 2024
401745d
Merge pull request #3157 from aleksamagicka/improvement/hardhat1-linu…
NZT48 May 17, 2024
2a85feb
Add sync on update
Mihajlo-Pavlovic May 20, 2024
5a69974
Merge pull request #3165 from OriginTrail/v6/paranets-update-finaliza…
NZT48 May 20, 2024
0698c8f
Update SQL migration for paranet table creation
NZT48 May 23, 2024
0a7a2f4
Temp commit to add dependecy on gh branc for dkg-evm-modul
NZT48 May 23, 2024
0114a83
Remove duplicate paranet service
NZT48 May 23, 2024
3097456
Remove wrong paranet method
NZT48 May 23, 2024
2b702e0
Lowercase Paranet db table
NZT48 May 23, 2024
f983cb1
Setup paranet triple store repository initialization
NZT48 May 23, 2024
0b68b32
Set start paranet command to always start
NZT48 May 23, 2024
84a63bc
Fix paranet db model
NZT48 May 23, 2024
0d8534f
Query improvment
Mihajlo-Pavlovic May 24, 2024
7437ef1
Fix paranet repository initialization
NZT48 May 24, 2024
ab7580f
Implement get KA count for Paranet from local db
NZT48 May 24, 2024
0dc46c9
Rename paranet blockchain functions
NZT48 May 24, 2024
d6b60f7
Fix paranet sync commands
NZT48 May 24, 2024
4899d74
Merge branch 'v6/paranets' into v6/update-query-to-supprot-paranets
Mihajlo-Pavlovic May 27, 2024
33de523
Add validation
Mihajlo-Pavlovic May 27, 2024
6ee9a18
Fix update KA count
NZT48 May 27, 2024
fa847d1
Fix paranet sync command
NZT48 May 27, 2024
3db5ac8
Fix get paranet knowledge asset locator
NZT48 May 27, 2024
8f38cc7
Fix paranet exists check
NZT48 May 27, 2024
2ddc3ec
Fix promises for paranet syncing
NZT48 May 27, 2024
ecadd66
Fix check if paranet exists
NZT48 May 27, 2024
7170578
Fix typo and set operation status
NZT48 May 27, 2024
a28b15f
Remove assetSyncInsertedByCommand, it is never used
Mihajlo-Pavlovic May 28, 2024
6461ca4
Fix get arguments not propagating for paranet sync
Mihajlo-Pavlovic May 28, 2024
ac242d0
Make asset sync work and store KA
NZT48 May 28, 2024
d907627
Refactor get service for paranet sync
NZT48 May 28, 2024
29bca57
Add tracking of missed paranet KA to paranet sync command
Mihajlo-Pavlovic May 29, 2024
6abd37b
Add missed asset syncing
Mihajlo-Pavlovic May 29, 2024
0651265
Fix missed paranet asset data model
NZT48 May 29, 2024
7fcfcd7
Update paranet sync command to store missed assets
NZT48 May 29, 2024
3ce05ec
Fix arguments for paranetAssetExists function
NZT48 May 31, 2024
de19398
Add function to construct paranet UAL
NZT48 May 31, 2024
a684ab6
Add functions to check if KA is part of Paranet and find out which
NZT48 May 31, 2024
ced2eca
Change update logic to handle paranet update with new missed asset re…
NZT48 May 31, 2024
8457cb2
Change update logic to handle paranet update with new missed asset re…
NZT48 May 31, 2024
77266b4
Update eslint disable comments
NZT48 May 31, 2024
459087c
Restore local blockchain setup
NZT48 May 31, 2024
2d67f95
Bump version to 6.4.0
NZT48 May 31, 2024
00ad946
Merge pull request #3167 from OriginTrail/v6/update-query-to-supprot-…
NZT48 May 31, 2024
63f63f1
Increase paranet sync frequency to 5 min
NZT48 May 31, 2024
8493f6c
Merge pull request #3164 from OriginTrail/v6/paranets
NZT48 May 31, 2024
b49a28e
Merge pull request #3169 from OriginTrail/v6/develop
NZT48 May 31, 2024
d594c11
Hotfix validation on query rout
NZT48 May 31, 2024
8f7cd15
Merge pull request #3171 from OriginTrail/v6/query-hotfix
NZT48 May 31, 2024
9d00ac6
Merge pull request #3173 from OriginTrail/v6/develop
NZT48 May 31, 2024
723d645
Merge pull request #3170 from OriginTrail/v6/prerelease/devnet
NZT48 May 31, 2024
721d0a6
Use getName & getDescription instead of getMetadata
Mihajlo-Pavlovic Jun 4, 2024
7a12179
Version bump
Mihajlo-Pavlovic Jun 4, 2024
b2035c3
Make repository name to be lower case for paranets
NZT48 Jun 4, 2024
74ff6d3
Fix logic for handling missed paranet KA
NZT48 Jun 4, 2024
691303c
Merge pull request #3174 from OriginTrail/fix/initializeParanetRecord…
NZT48 Jun 4, 2024
731f794
Merge pull request #3176 from OriginTrail/v6/develop
NZT48 Jun 4, 2024
c7967f8
Merge pull request #3177 from OriginTrail/v6/prerelease/devnet
NZT48 Jun 4, 2024
4c7f96d
Remove hotfix from version
NZT48 Jun 5, 2024
b115b57
Fix processing for federated queries
NZT48 Jun 5, 2024
73b17e1
Merge pull request #3178 from OriginTrail/hotfix/federated-query
NZT48 Jun 5, 2024
66544cc
Merge pull request #3179 from OriginTrail/v6/develop
NZT48 Jun 5, 2024
fc3bce7
Merge pull request #3180 from OriginTrail/v6/prerelease/devnet
NZT48 Jun 5, 2024
e160adc
Merge pull request #3181 from OriginTrail/v6/development-network
NZT48 Jun 5, 2024
33b2bd8
Merge pull request #3182 from OriginTrail/v6/development-network
NZT48 Jun 5, 2024
cd3b0a1
Merge pull request #3183 from OriginTrail/v6/prerelease/testnet
NZT48 Jun 5, 2024
b5a3b50
Fix/handle state finalized events (#3184)
Mihajlo-Pavlovic Jun 7, 2024
835c38c
OriginTrail Devnet Prerelease v6.4.0 Hotfix 4 (#3185)
Mihajlo-Pavlovic Jun 7, 2024
84e50dc
Fix/add syncing paranets at blockchain check (#3187)
Mihajlo-Pavlovic Jun 7, 2024
19e80a7
Merge devnet
Mihajlo-Pavlovic Jun 7, 2024
cea70f1
OriginTrail Devnet Prerelease v6.4.0 Hotfix 5 (#3188)
Mihajlo-Pavlovic Jun 7, 2024
4fe30a8
OriginTrail Devnet Release v6.4.0 Hotfix 5 (#3189)
Mihajlo-Pavlovic Jun 7, 2024
452adf5
Merge branch 'v6/prerelease/testnet' into v6/development-network
Mihajlo-Pavlovic Jun 7, 2024
415df0b
OriginTrail Devnet Release v6.4.0 Hotfix 5 (#3189) (#3190)
Mihajlo-Pavlovic Jun 7, 2024
43927a2
OriginTrail Devnet Release v6.4.0 Hotfix 5 (#3189) (#3190) (#3191)
Mihajlo-Pavlovic Jun 7, 2024
46d19dd
Remove hotfix from version
NZT48 Jun 10, 2024
b2813c6
Fix check for missed paranet KA sync
NZT48 Jun 10, 2024
251a91f
Merge pull request #3192 from OriginTrail/v6/fix/missed-paranet-ka
NZT48 Jun 10, 2024
39692cf
Merge branch 'v6/develop' into v6/prerelease/devnet
NZT48 Jun 11, 2024
4cd3869
Improve paranet sync command logic
NZT48 Jun 12, 2024
ccc617a
Set dkg-evm-module dependency to npm version
NZT48 Jun 13, 2024
e41e6fc
Merge pull request #3196 from OriginTrail/improve-paranet-logs
NZT48 Jun 13, 2024
1dda419
Merge pull request #3193 from OriginTrail/v6/develop
NZT48 Jun 13, 2024
e82fe82
Merge pull request #3198 from OriginTrail/v6/prerelease/devnet
NZT48 Jun 13, 2024
7bc4cbc
Merge pull request #3199 from OriginTrail/v6/development-network
NZT48 Jun 13, 2024
bb8d721
Fix package lock for hotfix 7
NZT48 Jun 13, 2024
193e337
Merge pull request #3200 from OriginTrail/v6/evm-package-lock-fix
NZT48 Jun 13, 2024
8b6b895
Merge pull request #3201 from OriginTrail/v6/develop
NZT48 Jun 13, 2024
490dfb1
Merge branch 'v6/develop' into v6/release/testnet
NZT48 Jun 13, 2024
fce7c10
resolve conflicts
NZT48 Jun 13, 2024
5fde905
Merge branch 'v6/prerelease/devnet' into v6/develop
NZT48 Jun 13, 2024
81a6460
Merge pull request #3205 from OriginTrail/v6/develop
NZT48 Jun 13, 2024
cd3ebd0
Merge pull request #3202 from OriginTrail/v6/prerelease/devnet
NZT48 Jun 13, 2024
abcad0b
Merge pull request #3206 from OriginTrail/v6/development-network
NZT48 Jun 13, 2024
f32d25f
Resolve conflicts'
NZT48 Jun 13, 2024
018fe7f
Merge branch 'v6/prerelease/testnet' of https://github.com/OriginTrai…
NZT48 Jun 13, 2024
e44c693
Merge pull request #3207 from OriginTrail/v6/prerelease/testnet
NZT48 Jun 13, 2024
8c6e901
remove hotfix
NZT48 Jun 13, 2024
f32769f
Merge pull request #3208 from OriginTrail/v6/6.4.0-version-fix
NZT48 Jun 13, 2024
48ef996
Merge pull request #3209 from OriginTrail/v6/develop
NZT48 Jun 13, 2024
8ee55d4
Merge pull request #3210 from OriginTrail/v6/prerelease/devnet
NZT48 Jun 13, 2024
08ce682
Merge pull request #3211 from OriginTrail/v6/development-network
NZT48 Jun 13, 2024
292f63f
Merge pull request #3212 from OriginTrail/v6/prerelease/testnet
NZT48 Jun 13, 2024
b3d7acf
resolve conflicts
NZT48 Jun 13, 2024
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
15 changes: 15 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "info",
"assetSync": {
"syncParanets": []
},
"auth": {
"ipBasedAuthEnabled": true,
"tokenBasedAuthEnabled": false,
Expand Down Expand Up @@ -317,6 +320,9 @@
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
"assetSync": {
"syncParanets": []
},
"auth": {
"ipBasedAuthEnabled": true,
"tokenBasedAuthEnabled": false,
Expand Down Expand Up @@ -488,6 +494,9 @@
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
"assetSync": {
"syncParanets": []
},
"auth": {
"ipBasedAuthEnabled": true,
"tokenBasedAuthEnabled": false,
Expand Down Expand Up @@ -659,6 +668,9 @@
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
"assetSync": {
"syncParanets": []
},
"auth": {
"ipBasedAuthEnabled": true,
"tokenBasedAuthEnabled": false,
Expand Down Expand Up @@ -830,6 +842,9 @@
"commandExecutorVerboseLoggingEnabled": false,
"appDataPath": "data",
"logLevel": "trace",
"assetSync": {
"syncParanets": []
},
"auth": {
"ipBasedAuthEnabled": true,
"tokenBasedAuthEnabled": false,
Expand Down
52 changes: 52 additions & 0 deletions ot-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class OTNode {
this.initializeEventEmitter();

await this.initializeModules();
await this.initializeParanets();

await MigrationExecutor.executeRemoveServiceAgreementsForChiadoMigration(
this.container,
Expand Down Expand Up @@ -341,6 +342,57 @@ class OTNode {
await autoUpdaterCommand.execute();
}

async initializeParanets() {
const blockchainModuleManager = this.container.resolve('blockchainModuleManager');
const tripleStoreService = this.container.resolve('tripleStoreService');
const tripleStoreModuleManager = this.container.resolve('tripleStoreModuleManager');
const paranetService = this.container.resolve('paranetService');
const ualService = this.container.resolve('ualService');
const validParanets = [];

// eslint-disable-next-line no-unsafe-optional-chaining
for (const paranetUAL of this.config.assetSync?.syncParanets) {
if (!ualService.isUAL(paranetUAL)) {
this.logger.warn(
`Unable to initialize Paranet with id ${paranetUAL} because of invalid UAL format`,
);
} else {
const { blockchain, contract, tokenId } = ualService.resolveUAL(paranetUAL);
if (!blockchainModuleManager.getImplementationNames().includes(blockchain)) {
this.logger.warn(
`Unable to initialize Paranet with id ${paranetUAL} because of unsupported blockchain implementation`,
);
} else {
const paranetId = paranetService.constructParanetId(
blockchain,
contract,
tokenId,
);
// eslint-disable-next-line no-await-in-loop
const paranetExists = await blockchainModuleManager.paranetExists(
blockchain,
paranetId,
);
if (!paranetExists) {
this.logger.warn(
`Unable to initialize Paranet with id ${paranetUAL} because it doesn't exist`,
);
} else {
validParanets.push(paranetUAL);
const repository = paranetService.getParanetRepositoryName(paranetUAL);
// eslint-disable-next-line no-await-in-loop
await tripleStoreModuleManager.initializeParanetRepository(repository);
// eslint-disable-next-line no-await-in-loop
await paranetService.initializeParanetRecord(blockchain, paranetId);
}
}
}
}

this.config.assetSync.syncParanets = validParanets;
tripleStoreService.initializeRepositories();
}

stop(code = 0) {
this.logger.info('Stopping node...');
process.exit(code);
Expand Down
Loading
Loading