Skip to content

Commit

Permalink
Merge pull request #3636 from OriginTrail/v8/develop
Browse files Browse the repository at this point in the history
Devnet Release v8.0.0.hotifx+2
  • Loading branch information
Mihajlo-Pavlovic authored Dec 27, 2024
2 parents 58ff037 + b41e559 commit 0a860e5
Show file tree
Hide file tree
Showing 11 changed files with 252 additions and 50 deletions.
113 changes: 113 additions & 0 deletions installer/data/template/.origintrail_noderc_one_click_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"modules":{
"network": {
"implementation": {
"libp2p-service": {
"config": {
"nat": {
"enabled": true,
"externalIp": "<node_static_ip_address>"
}
}
}
}
},
"blockchain":{
"implementation":{
"otp:2043":{
"enabled":true,
"config":{
"sharesTokenName":"<node_name>",
"sharesTokenSymbol":"<node_symbol>",
"operatorFee":"<operator_fee>",
"evmManagementWalletPublicKey":"<management_wallet_public_key>",
"operationalWallets":[
{
"evmAddress":"<operational_wallet_public_key>",
"privateKey":"<operational_wallet_private_key>"
}
]
}
},
"gnosis:100":{
"enabled":true,
"config":{
"sharesTokenName":"<node_name>",
"sharesTokenSymbol":"<node_symbol>",
"operatorFee":"<operator_fee>",
"rpcEndpoints":[
"<gnosis_rpc_endpoint>"
],
"evmManagementWalletPublicKey":"<management_wallet_public_key>",
"operationalWallets":[
{
"evmAddress":"<operational_wallet_public_key>",
"privateKey":"<operational_wallet_private_key>"
}
]
}
},
"base:8453":{
"enabled":true,
"config":{
"evmManagementWalletPublicKey":"<management_wallet_public_key>",
"operationalWallets":[
{
"evmAddress":"<operational_wallet_public_key>",
"privateKey":"<operational_wallet_private_key>"
}
],
"sharesTokenName":"<node_name>",
"sharesTokenSymbol":"<node_symbol>",
"operatorFee":"<operator_fee>",
"rpcEndpoints":[
"<base_rpc_endpoint>"
]
}
}
}
},
"tripleStore":{
"implementation":{
"ot-blazegraph":{
"enabled":true,
"package":"./triple-store/implementation/ot-blazegraph/ot-blazegraph.js",
"config":{
"repositories":{
"privateCurrent":{
"url":"http://localhost:9999",
"name":"private-current",
"username":"admin",
"password":""
},
"privateHistory":{
"url":"http://localhost:9999",
"name":"private-history",
"username":"admin",
"password":""
},
"publicCurrent":{
"url":"http://localhost:9999",
"name":"public-current",
"username":"admin",
"password":""
},
"publicHistory":{
"url":"http://localhost:9999",
"name":"public-history",
"username":"admin",
"password":""
}
}
}
}
}
}
},
"auth":{
"ipWhitelist":[
"::1",
"127.0.0.1"
]
}
}
113 changes: 113 additions & 0 deletions installer/data/template/.origintrail_noderc_one_click_testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"modules":{
"network": {
"implementation": {
"libp2p-service": {
"config": {
"nat": {
"enabled": true,
"externalIp": "<node_static_ip_address>"
}
}
}
}
},
"blockchain":{
"implementation":{
"otp:20430":{
"enabled":true,
"config":{
"sharesTokenName":"<node_name>",
"sharesTokenSymbol":"<node_symbol>",
"operatorFee":"<operator_fee>",
"evmManagementWalletPublicKey":"<management_wallet_public_key>",
"operationalWallets":[
{
"evmAddress":"<operational_wallet_public_key>",
"privateKey":"<operational_wallet_private_key>"
}
]
}
},
"gnosis:10200":{
"enabled":true,
"config":{
"sharesTokenName":"<node_name>",
"sharesTokenSymbol":"<node_symbol>",
"operatorFee":"<operator_fee>",
"rpcEndpoints":[
"<gnosis_rpc_endpoint>"
],
"evmManagementWalletPublicKey":"<management_wallet_public_key>",
"operationalWallets":[
{
"evmAddress":"<operational_wallet_public_key>",
"privateKey":"<operational_wallet_private_key>"
}
]
}
},
"base:84532":{
"enabled":true,
"config":{
"evmManagementWalletPublicKey":"<management_wallet_public_key>",
"operationalWallets":[
{
"evmAddress":"<operational_wallet_public_key>",
"privateKey":"<operational_wallet_private_key>"
}
],
"sharesTokenName":"<node_name>",
"sharesTokenSymbol":"<node_symbol>",
"operatorFee":"<operator_fee>",
"rpcEndpoints":[
"<base_rpc_endpoint>"
]
}
}
}
},
"tripleStore":{
"implementation":{
"ot-blazegraph":{
"enabled":true,
"package":"./triple-store/implementation/ot-blazegraph/ot-blazegraph.js",
"config":{
"repositories":{
"privateCurrent":{
"url":"http://localhost:9999",
"name":"private-current",
"username":"admin",
"password":""
},
"privateHistory":{
"url":"http://localhost:9999",
"name":"private-history",
"username":"admin",
"password":""
},
"publicCurrent":{
"url":"http://localhost:9999",
"name":"public-current",
"username":"admin",
"password":""
},
"publicHistory":{
"url":"http://localhost:9999",
"name":"public-history",
"username":"admin",
"password":""
}
}
}
}
}
}
},
"auth":{
"ipWhitelist":[
"::1",
"127.0.0.1"
]
}
}
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+hotfix.1",
"version": "8.0.0+hotfix.2",
"description": "OTNode V8",
"main": "index.js",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class ProtocolScheduleMessagesCommand extends Command {
currentBatchNodes.length
}, leftover for retry: ${currentBatchLeftoverNodes.length}`,
);
const nextCommandData = this.getNextCommandData(command);
console.log('NEXT COMMAND DATA:', JSON.stringify(nextCommandData, null, 2));

const addCommandPromises = currentBatchNodes.map(async (node) => {
const commandSequence = this.protocolService.getSenderCommandSequence(node.protocol);
Expand All @@ -48,7 +50,7 @@ class ProtocolScheduleMessagesCommand extends Command {
sequence: commandSequence.slice(1),
delay: 0,
data: {
...this.getNextCommandData(command),
...nextCommandData,
blockchain,
operationId,
node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@ class HandleGetRequestCommand extends HandleProtocolMessageCommand {
burned: [],
};
}
} else {
// kaId is number, so transform it to range
knowledgeAssetId = {
startTokenId: knowledgeAssetId,
endTokenId: knowledgeAssetId,
burned: [],
};
}

assertionPromise = this.tripleStoreService
.getAssertion(
blockchain,
Expand Down
8 changes: 8 additions & 0 deletions src/commands/protocols/get/sender/local-get-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,15 @@ class LocalGetCommand extends Command {
burned: [],
};
}
} else {
// kaId is number, so transform it to range
knowledgeAssetId = {
startTokenId: knowledgeAssetId,
endTokenId: knowledgeAssetId,
burned: [],
};
}

assertionPromise = this.tripleStoreService
.getAssertion(
blockchain,
Expand Down
4 changes: 2 additions & 2 deletions src/modules/base-module-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class BaseModuleManager {

getImplementation(name = null) {
const keys = Object.keys(this.handlers);
if (keys.length === 1 || !name) {
return this.handlers[keys[0]];
if (!keys.includes(name)) {
throw new Error(`Blockchain: ${name} implementation is not enabled.`);
}
return this.handlers[name];
}
Expand Down
8 changes: 2 additions & 6 deletions src/modules/blockchain/blockchain-module-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ class BlockchainModuleManager extends BaseModuleManager {
}

callImplementationFunction(blockchain, functionName, args = []) {
if (blockchain) {
if (this.getImplementation(blockchain)) {
return this.getImplementation(blockchain).module[functionName](...args);
}
} else {
return this.getImplementation().module[functionName](...args);
if (this.getImplementation(blockchain)) {
return this.getImplementation(blockchain).module[functionName](...args);
}
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ export async function up({ context: { queryInterface } }) {
const indexes = [
{ table: 'shard', column: ['blockchain_id'], name: 'shard_blockchain_id_index' },
{ table: 'shard', column: ['last_dialed'], name: 'last_dialed_index' },
{
table: 'service_agreement',
column: ['blockchain_id'],
name: 'service_agreement_blockchain_id_index',
},
{
table: 'service_agreement',
column: ['blockchain_id', 'token_id'],
name: 'blockchain_id_token_id_index',
},
{ table: 'service_agreement', column: ['token_id'], name: 'token_id_index' },
{ table: 'paranet_synced_asset', column: ['ual'], name: 'paranet_synced_asset_ual_index' },
{
table: 'paranet_synced_asset',
Expand Down Expand Up @@ -103,12 +92,6 @@ export async function down({ context: { queryInterface } }) {

await queryInterface.removeIndex('shard', 'last_dialed_index');

await queryInterface.removeIndex('service_agreement', 'service_agreement_blockchain_id_index');

await queryInterface.removeIndex('service_agreement', 'blockchain_id_token_id_index');

await queryInterface.removeIndex('service_agreement', 'token_id_index');

await queryInterface.removeIndex('paranet_synced_asset', 'paranet_synced_asset_ual_index');

await queryInterface.removeIndex('paranet_synced_asset', 'paranet_ual_data_source_index');
Expand Down

0 comments on commit 0a860e5

Please sign in to comment.